-
Notifications
You must be signed in to change notification settings - Fork 0
/
jest.config.js
executable file
·126 lines (96 loc) · 3.77 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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
module.exports = {
preset: 'ts-jest',
// For a detailed explanation regarding each configuration property, visit:
// https://jestjs.io/docs/en/configuration.html
// All imported modules in your tests should be mocked automatically
// automock: true,
// Stop running tests after the first failure
bail: false,
// The directory where Jest should store its cached dependency information
// cacheDirectory: './tmp/jest_rs',
// Automatically clear mock calls and instances between every test
// clearMocks: false,
// Indicates whether the coverage information should be collected while executing the test
collectCoverage: true,
// An array of glob patterns indicating a set of files for which coverage information should be collected
// collectCoverageFrom: null,
// The directory where Jest should output its coverage files
coverageDirectory: 'coverage',
// An array of regexp pattern strings used to skip coverage collection
coveragePathIgnorePatterns: [
'/node_modules/',
],
// A list of reporter names that Jest uses when writing coverage reports
coverageReporters: [
'json',
'html'
],
// An object that configures minimum threshold enforcement for coverage results
// coverageThreshold: null,
// Make calling deprecated APIs throw helpful error messages
// errorOnDeprecated: false,
// A path to a module which exports an async function that is triggered once before all test suites
// globalSetup: null,
// A path to a module which exports an async function that is triggered once after all test suites
// globalTeardown: null,
// A set of global variables that need to be available in all test environments
globals: {
'ts-jest': {
}
},
// An array of directory names to be searched recursively up from the requiring module's location
// moduleDirectories: [
// 'node_modules'
// ],
// An array of file extensions your modules use
moduleFileExtensions: ['ts', 'js', 'json', 'node'],
// A map from regular expressions to module names that allow to stub out resources with a single module
// moduleNameMapper: {
// '(.*)$': '<rootDir>/src/types/$1'
// },
// Activates notifications for test results
notify: true,
// An enum that specifies notification mode. Requires { notify: true }
notifyMode: 'always',
// Use this configuration option to add custom reporters to Jest
// reporters: undefined,
// Automatically reset mock state between every test
// resetMocks: false,
// Reset the module registry before running each individual test
// resetModules: false,
// Automatically restore mock state between every test
// restoreMocks: false,
// The root directory that Jest should scan for tests and modules within
// rootDir: 'src',
// A list of paths to directories that Jest should use to search for files in
// roots: [
// '<rootDir>'
// ],
// The test environment that will be used for testing
testEnvironment: 'node',
// Options that will be passed to the testEnvironment
// testEnvironmentOptions: {},
testPathIgnorePatterns: [
'/test/data/*',
'/test/.*config.ts',
// '/test/sorting.ts',
'/test/utils.ts',
],
// The glob patterns Jest uses to detect test files
testMatch: [
'**/test/**/*.js?(x)',
'**/test/**/*.ts?(x)',
],
transform: {
'^.+\\.ts?$': 'ts-jest',
},
// testRegex: '(/test/.*|(\\.|/)(test|spec))\\.(js?|ts?)$',
// The regexp pattern Jest uses to detect test files
// testRegex: './test/.*.js$',
// Indicates whether each individual test should be reported during the run
verbose: true,
// 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
}