-
Notifications
You must be signed in to change notification settings - Fork 0
/
jest.config.ts
49 lines (37 loc) · 1.65 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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
/*
* For a detailed explanation regarding each configuration property and type check, visit:
* https://jestjs.io/docs/configuration
*/
export default {
// Automatically clear mock calls, instances, contexts and results before every test
clearMocks: true,
// Indicates whether the coverage information should be collected while executing the test
collectCoverage: true,
// The directory where Jest should output its coverage files
coverageDirectory: 'coverage',
collectCoverageFrom: ['src/**/*.ts'],
coveragePathIgnorePatterns: [
'node_modules',
'test-config',
'interfaces',
'<rootDir>/src/app.ts',
'<rootDir>/src/test-utils',
'<rootDir>/src/DB',
'<rootDir>/src/utils/environment-variables.ts',
'<rootDir>/src/utils/logger.ts',
],
// An array of file extensions your modules use
moduleFileExtensions: ['js', 'ts', 'json', 'node'],
// A list of paths to directories that Jest should use to search for files in
roots: ['<rootDir>/src'],
// A list of paths to modules that run some code to configure or set up the testing framework before each test
setupFilesAfterEnv: ['<rootDir>/src/test-utils/setup.ts'],
// The test environment that will be used for testing
testEnvironment: 'node',
// The regexp pattern or array of patterns that Jest uses to detect test files
testRegex: ['(/__tests__/.*|(\\.|/)(test|spec))\\.tsx?$'],
// A map from regular expressions to paths to transformers
transform: { '^.+\\.tsx?$': 'ts-jest' },
// Indicates whether each individual test should be reported during the run
verbose: true,
};