forked from postmanlabs/postman-sandbox
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.nycrc.js
30 lines (27 loc) · 772 Bytes
/
.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
const TEST_TYPE = ((argv) => {
let match = argv[argv.length - 1].match(/npm\/test-(\w+).js/);
return match && match[1] || '';
})(process.argv);
function configOverrides(testType) {
switch (testType) {
case 'unit':
return {
statements: 55,
branches: 40,
functions: 40,
lines: 55
};
default:
return {}
}
}
module.exports = {
// @todo cover `all` files by writing unit test for bundled lib/sandbox files
// all: true,
'check-coverage': true,
'report-dir': '.coverage',
'temp-dir': '.nyc_output',
include: ['lib/**/*.js'],
reporter: ['lcov', 'json', 'text', 'text-summary'],
...configOverrides(TEST_TYPE),
};