-
Notifications
You must be signed in to change notification settings - Fork 17
/
Copy pathjest.config.cjs
38 lines (38 loc) · 980 Bytes
/
jest.config.cjs
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
module.exports = {
testMatch: [
'<rootDir>/src/**/?(*.)+(spec|test).[jt]s?(x)',
'<rootDir>/tests/**/?(*.)+(spec|test).[jt]s?(x)'
],
testEnvironment: 'node',
moduleDirectories: ['node_modules', 'src'],
setupFilesAfterEnv: ['<rootDir>/jestSetup.ts'],
// moduleNameMapper: {
// '~/(.*)': '<rootDir>/src/$1'
// },
watchPlugins: [
'jest-watch-typeahead/filename',
'jest-watch-typeahead/testname'
],
globals: {
__DEV__: false, //toggle to true to execute the code in __DEV__ scope
__VERSION__: 'jest-version',
__BUILD_DATE__: 'jest-build-date',
__COMMIT_SHA__: 'jest-commit-sha'
},
collectCoverageFrom: [
'<rootDir>/src/**',
'!<rootDir>/src/index.ts',
'!<rootDir>/src/types.ts',
'!<rootDir>/src/**.d.ts',
'!<rootDir>/src/__tests__/**',
'!<rootDir>/src/__fixtures__/**'
],
coverageThreshold: {
global: {
branches: 80,
functions: 80,
lines: 80,
statements: 80
}
}
}