-
Notifications
You must be signed in to change notification settings - Fork 0
/
jest.config.js
34 lines (29 loc) · 1.1 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
module.exports = {
moduleFileExtensions: ['js', 'json', 'ts'],
// An array of glob patterns indicating a set of files for which coverage information should be collected
collectCoverageFrom: [
'!<rootDir>/test/**',
'!<rootDir>/src/main.ts',
// '<rootDir>/src/**/*.ts',
// '!<rootDir>/src/domain/entities/**',
// '!<rootDir>/src/**/index.ts',
],
// The directory where Jest should output its coverage files
coverageDirectory: 'cov',
// Indicates which provider should be used to instrument code for coverage
// coverageProvider: 'babel',
// A map from regular expressions to module names or to arrays of module names that allow to stub out resources with a single module
moduleNameMapper: {
'@/test/(.+)': '<rootDir>/test/$1',
'@/(.+)': '<rootDir>/src/$1',
},
// A list of paths to directories that Jest should use to search for files in
roots: ['<rootDir>/src', '<rootDir>/test'],
// A map from regular expressions to paths to transformers
transform: {
'\\.ts$': 'ts-jest',
},
clearMocks: true,
testMatch: ['**/*.(spec|test).ts'],
maxWorkers: '50%',
};