-
Notifications
You must be signed in to change notification settings - Fork 82
/
Copy pathjest.config.js
37 lines (33 loc) · 888 Bytes
/
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
module.exports = {
...require('./test/jest.common'),
// specify the configs to run at the same time
projects: [
'./test/jest.client.js',
'./test/jest.server.js',
'./test/jest.lint.js',
],
// only collect coverage for files found in the src folder
// Include all files in coverage that may not have any tests, as by default
// Jest creates coverage only for files that have tests.
collectCoverageFrom: ['<rootDir>/src/**/*.js'],
coverageThreshold: {
global: {
// expect 100% coverage everywhere
// statements: 100,
// branches: 100,
// lines: 100,
// functions: 100,
statements: 17,
branches: 4,
lines: 17,
functions: 20,
},
// set thresholds specifically for utils.js
'src/utils.js': {
statements: 100,
branches: 80,
lines: 100,
functions: 100,
},
},
};