-
Notifications
You must be signed in to change notification settings - Fork 116
/
Copy path.nycrc.js
43 lines (40 loc) · 1.04 KB
/
.nycrc.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
const TEST_TYPE = ((argv) => {
let match = argv[argv.length - 1].match(/npm\/test-(\S+).js/);
return match && match[1] || '';
})(process.argv);
function configOverrides(testType) {
switch (testType) {
case 'unit':
return {
statements: 40,
branches: 30,
functions: 30,
lines: 40
};
case 'integration':
return {
statements: 65,
branches: 60,
functions: 70,
lines: 65
};
case 'integration-legacy':
return {
statements: 45,
branches: 34,
functions: 43,
lines: 45
};
default:
return {}
}
}
module.exports = {
all: true,
'check-coverage': true,
'report-dir': '.coverage',
'temp-dir': '.nyc_output',
include: ['lib/**/*.js'],
reporter: ['lcov', 'json', 'text', 'text-summary'],
...configOverrides(TEST_TYPE),
};