generated from ivandotv/microbundle-template
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathjest.config.cjs
33 lines (33 loc) · 832 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
module.exports = {
testMatch: [
'<rootDir>/src/**/?(*.)+(spec|test).[jt]s?(x)',
'<rootDir>/tests/?(*.)+(spec|test).[jt]s?(x)'
],
testEnvironment: 'node',
moduleDirectories: ['node_modules', 'src'],
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/globals.d.ts',
'!<rootDir>/src/__tests__/**',
'!<rootDir>/src/__fixtures__/**'
],
coverageThreshold: {
global: {
branches: 70,
functions: 80,
lines: 80,
statements: 80
}
}
}