2024-09-20 12:02:52 +03:00
|
|
|
import { JestConfigWithTsJest } from 'ts-jest';
|
|
|
|
|
|
|
|
const jestConfig: JestConfigWithTsJest = {
|
2024-03-05 19:43:31 +03:00
|
|
|
// to enable logs, comment out the following line
|
|
|
|
silent: true,
|
2023-06-16 11:38:11 +03:00
|
|
|
clearMocks: true,
|
2024-09-20 12:02:52 +03:00
|
|
|
displayName: 'twenty-server',
|
2023-06-16 11:38:11 +03:00
|
|
|
rootDir: './',
|
2024-09-20 12:02:52 +03:00
|
|
|
testEnvironment: 'node',
|
2024-10-05 01:22:38 +03:00
|
|
|
transformIgnorePatterns: ['/node_modules/'],
|
2023-06-16 11:38:11 +03:00
|
|
|
testRegex: '.*\\.spec\\.ts$',
|
|
|
|
transform: {
|
|
|
|
'^.+\\.(t|j)s$': 'ts-jest',
|
|
|
|
},
|
2024-09-20 12:02:52 +03:00
|
|
|
moduleNameMapper: {
|
|
|
|
'^src/(.*)': '<rootDir>/src/$1',
|
|
|
|
},
|
|
|
|
moduleFileExtensions: ['js', 'json', 'ts'],
|
|
|
|
modulePathIgnorePatterns: ['<rootDir>/dist'],
|
2024-05-13 15:50:27 +03:00
|
|
|
fakeTimers: {
|
|
|
|
enableGlobally: true,
|
|
|
|
},
|
2023-06-16 11:38:11 +03:00
|
|
|
collectCoverageFrom: ['**/*.(t|j)s'],
|
|
|
|
coverageDirectory: '../coverage',
|
|
|
|
};
|
2024-09-20 12:02:52 +03:00
|
|
|
|
|
|
|
export default jestConfig;
|