ToolJet/server/jest.config.ts
Akshay 431dc961cd
Feature: Add data transfer object layer to validate and sanitize user inputs (#2694)
* add sanitize-html to be used with dto

* add dto for controllers

* add vaalidation to check token not empty

* update test config

* add validation pipe on test setup

* fix spec

* fix params casing

* update dto for empt checks

* update reset password dto

* only check for options to be defined

* update specs

* update dto and spec

* Remove invalid decorator

* update package-lock

* update thread dto

* update user dto

* fix email

* make comment req params attributes as optional

* fix specs
2022-04-20 14:46:57 +05:30

22 lines
672 B
TypeScript

module.exports = async () => {
return {
verbose: true,
moduleFileExtensions: ['js', 'json', 'ts'],
rootDir: '.',
testEnvironment: 'node',
testRegex: '.spec.ts$',
testPathIgnorePatterns: ['.e2e-spec.ts$'],
transform: {
'^.+\\.(t|j)s$': 'ts-jest',
},
moduleNameMapper: {
'dist/src/entities/(.*)': '<rootDir>/dist/src/entities/$1',
'^src/(.*)': '<rootDir>/src/$1',
'@dto/(.*)': '<rootDir>/src/dto/$1',
'@plugins/(.*)': '<rootDir>/plugins/$1',
'@services/(.*)': '<rootDir>/src/services/$1',
'@controllers/(.*)': '<rootDir>/src/controllers/$1',
'@ee/(.*)': '<rootDir>/ee/$1',
},
};
};