forked from vuestorefront/magento2
-
Notifications
You must be signed in to change notification settings - Fork 0
/
jest.base.config.js
58 lines (47 loc) · 1.25 KB
/
jest.base.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
49
50
51
52
53
54
55
56
57
58
// For a detailed explanation regarding each configuration property, visit:
// https://jestjs.io/docs/en/configuration.html
module.exports = {
globals: {
__DEV__: true,
},
// noStackTrace: true,
// bail: true,
// cache: false,
// verbose: true,
// watch: true,
coverageReporters: ['lcov'],
coverageThreshold: {
global: {
// branches: 50,
// functions: 50,
// lines: 50,
// statements: 50
},
},
coveragePathIgnorePatterns: ['/node_modules/', '.d.ts$', '/__mocks__/'],
testEnvironment: 'jest-environment-jsdom-sixteen',
transform: {
'^.+\\.(ts)$': 'ts-jest',
},
coverageDirectory: './coverage/',
collectCoverageFrom: [
'src/**/*.ts',
],
setupFiles: [
'jest-date-mock',
'jest-localstorage-mock',
],
transformIgnorePatterns: [
'node_modules',
'<rootDir>/node_modules',
],
testMatch: ['<rootDir>/**/__tests__/**/*spec.[jt]s?(x)'],
watchPlugins: [
'jest-watch-typeahead/filename',
'jest-watch-typeahead/testname',
['jest-watch-toggle-config', { setting: 'verbose' }],
['jest-watch-toggle-config', { setting: 'collectCoverage' }],
['jest-watch-toggle-config', { setting: 'notify' }],
['jest-watch-toggle-config', { setting: 'bail' }],
],
};