-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathjest.config.ts
32 lines (30 loc) · 1 KB
/
jest.config.ts
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
27
28
29
30
31
32
import type { Config } from 'jest';
const config: Config = {
verbose: true,
moduleFileExtensions: ['js', 'json', 'ts'],
rootDir: 'src',
testRegex: '.*\\.(spec|test)\\.ts$',
transform: {
'^.+\\.(t|j)s$': 'ts-jest',
},
collectCoverageFrom: ['**/*.(t|j)s'],
coverageDirectory: '../coverage',
testEnvironment: 'node',
modulePaths: ['<rootDir>'],
moduleNameMapper: {
'^@database/(.*)$': '<rootDir>/database/$1',
'^@logger/(.*)$': '<rootDir>/logger/$1',
'^@middleware/(.*)$': '<rootDir>/middleware/$1',
'^@auth/(.*)$': '<rootDir>/auth/$1',
'^@boards/(.*)$': '<rootDir>/boards/$1',
'^@websocket/(.*)$': '<rootDir>/websocket/$1',
'^@users/(.*)$': '<rootDir>/users/$1',
'^@polls/(.*)$': '<rootDir>/polls/$1',
'^@votes/(.*)$': '<rootDir>/votes/$1',
'^@utils/(.*)$': '<rootDir>/utils/$1',
'^@common/(.*)$': '<rootDir>/common/$1',
'^@/(.*)$': '<rootDir>/$1',
},
// moduleFileExtensions: [...defaults.moduleFileExtensions, 'mts'],
};
export default config;