-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathjest.config.js
38 lines (32 loc) · 1.04 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
const { defaults } = require('jest-config'); // def. jest config object
const { collectCov } = require('yargs').argv;
// JEST Option (not cli option)
// - Ref: https://jestjs.io/docs/en/configuration#testmatch-arraystring
module.exports = {
verbose: true,
// # Mock & Global variable
clearMocks: true,
globals: {
// e.g. 'someGlobalVar': true
},
// # Coverage & Report
collectCoverage: true,
coverageDirectory: collectCov ? './coverage/' : './doc/test-report/',
coverageReporters: [ collectCov ? 'lcov' : 'text' ],
// # File to test (either use `testMatch` or `tesstRegex`)
testMatch: [
// '**/__tests__/**/*.[jt]s?(x)',
'**/?(*.)+(spec|test).[jt]s?(x)'
],
// # Folder/File to ignored
testPathIgnorePatterns: [
...defaults.testPathIgnorePatterns,
'./schematic/',
],
coveragePathIgnorePatterns: [
...defaults.coveragePathIgnorePatterns,
'./src/asset/ts/test-util/',
'./src/asset/ts/',
'./model/rule/default.ts'
]
};