-
Notifications
You must be signed in to change notification settings - Fork 48
/
jest.config.ts
47 lines (38 loc) · 1.11 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
export default {
// Stop running tests after `n` failures
// bail: 4,
// Automatically clear mock calls, instances, contexts and results before every test
clearMocks: true,
// An array of file extensions your modules use
moduleFileExtensions: [
'ts',
'tsx',
'js',
'mjs',
'cjs',
'jsx',
'ts',
'tsx',
'json',
'node'
],
// 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: {},
// A list of paths to directories that Jest should use to search for files in
roots: ['<rootDir>/src'],
// The test environment that will be used for testing
testEnvironment: 'jsdom',
// 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)?$': 'ts-jest'
},
// Whether to use watchman for file crawling
watchman: true,
globals: {
'ts-jest': {
tsConfig: 'tsconfig.test.json'
}
}
}