-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathjest.config.js
48 lines (37 loc) · 1.31 KB
/
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
38
39
40
41
42
43
44
45
46
47
48
module.exports = {
// Enable coverage
collectCoverage: true,
// Recommended to use `v8` to support the generation of native v8 coverage reports.
coverageProvider: 'v8',
// Monocart can also support all coverage reports, so there is no need to set up reports here.
coverageReporters: ['none'],
reporters: [
// If custom reporters are specified, the default Jest reporter will be overridden. If you wish to keep it, 'default' must be passed as a reporters name:
'default',
// Monocart custom reporter to generate coverage reports.
['./lib', {
// logging: 'debug',
name: 'Jest Monocart Coverage Report',
outputDir: './coverage-reports/v8',
all: './src',
sourcePath: {
'src/': ''
},
reports: [
'v8',
'codecov',
'raw',
'text'
],
onEntry: (entry) => {
if (entry.url.endsWith('wrapped.js')) {
// console.log(entry.functions.map((it) => it.ranges));
}
},
onEnd: () => {
console.log('onEnd (before the global teardown)');
}
}]
],
globalTeardown: './global-teardown.js'
};