feat: Add unit tests for backend validators and configure Jest.
This commit is contained in:
parent
ebcae0b3e7
commit
9bb941b45e
16 changed files with 2071 additions and 381 deletions
22
Backend/jest.config.js
Normal file
22
Backend/jest.config.js
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
/** @type {import('jest').Config} */
|
||||
const config = {
|
||||
preset: 'ts-jest',
|
||||
testEnvironment: 'node',
|
||||
roots: ['<rootDir>/tests'],
|
||||
testMatch: ['**/*.test.ts'],
|
||||
moduleNameMapper: {
|
||||
'^@/(.*)$': '<rootDir>/src/$1'
|
||||
},
|
||||
clearMocks: true,
|
||||
collectCoverageFrom: [
|
||||
'src/**/*.ts',
|
||||
'!src/**/*.d.ts',
|
||||
'!src/generated/**',
|
||||
'!src/server.ts'
|
||||
],
|
||||
transform: {
|
||||
'^.+\\.tsx?$': ['ts-jest', { tsconfig: './tsconfig.test.json' }]
|
||||
}
|
||||
};
|
||||
|
||||
module.exports = config;
|
||||
Loading…
Add table
Add a link
Reference in a new issue