-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathjest.config.js
36 lines (31 loc) · 1.32 KB
/
jest.config.js
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
33
34
35
36
module.exports = {
// Performs test coverage
roots: ['<rootDir>/tests'],
collectCoverageFrom: ['<rootDir>/src/**/*.ts', '!<rootDir>/src/main/**'], // Where jest will be applied
coverageDirectory: 'coverage',
coverageProvider: 'babel',
testEnvironment: 'node',
preset: '@shelf/jest-mongodb',
transform: {
// add to any text that has .ts the ts-jest, converted for ts to js
'.+\\.ts$': 'ts-jest',
},
moduleNameMapper: {
// allows jest to recognize tests that start with import with alias of "@/"
'@/tests/(.*)': '<rootDir>/tests/$1',
'@/(.*)': '<rootDir>/src/$1',
},
// An array of regexp pattern strings that are matched against all source file paths, matched files will skip transformation
// transformIgnorePatterns: [
// "\\\\node_modules\\\\",
// "\\.pnp\\.[^\\\\]+$"
// ],
// An array of regexp pattern strings that are matched against all modules before the module loader will automatically return a mock for them
// unmockedModulePathPatterns: undefined,
// Indicates whether each individual test should be reported during the run
// verbose: undefined,
// An array of regexp patterns that are matched against all source file paths before re-running tests in watch mode
// watchPathIgnorePatterns: [],
// Whether to use watchman for file crawling
// watchman: true,
};