-
-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathjest.config.cjs
More file actions
26 lines (26 loc) · 862 Bytes
/
jest.config.cjs
File metadata and controls
26 lines (26 loc) · 862 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
/** @type {import('ts-jest').JestConfigWithTsJest} */
module.exports = {
preset: 'ts-jest',
testEnvironment: 'node',
testMatch: ['**/test/**/*.test.ts'],
moduleFileExtensions: ['ts', 'js', 'json'],
roots: ['<rootDir>/test', '<rootDir>/server'],
transform: {
'^.+\\.ts$': ['ts-jest', {
tsconfig: 'tsconfig.test.json'
}]
},
setupFilesAfterEnv: ['<rootDir>/test/test-setup.ts'],
// Module path mapping
moduleNameMapper: {
'^@server/(.*)$': '<rootDir>/server/src/$1',
'^@test/(.*)$': '<rootDir>/test/$1',
'^@fixtures/(.*)$': '<rootDir>/test/fixtures/$1'
},
// Increase timeout for tests that might need cleanup
testTimeout: 30000,
// Force exit to prevent hanging
forceExit: true,
// Don't keep Jest open after test run
detectOpenHandles: true
};