-
Notifications
You must be signed in to change notification settings - Fork 57
/
Copy pathjest.config.js
63 lines (60 loc) · 2.09 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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
const config = {
verbose: true,
clearMocks: true,
testEnvironment: 'jest-environment-jsdom',
testRegex: [
'commands/.+\\.(test|spec)\\.jsx?$',
'apis/conversion/.+\\.(test|spec)\\.jsx?$',
'apis/enigma-mocker/.+\\.(test|spec)\\.jsx?$',
'apis/locale/.+\\.(test|spec)\\.jsx?$',
'apis/nucleus/.+\\.(test|spec)\\.jsx?$',
'apis/snapshooter/.+\\.(test|spec)\\.jsx?$',
'apis/supernova/.+\\.(test|spec)\\.jsx?$',
'apis/test-utils/.+\\.(test|spec)\\.jsx?$',
'apis/theme/.+\\.(test|spec)\\.jsx?$',
'packages/ui/.+\\.(test|spec)\\.jsx?$',
],
setupFilesAfterEnv: ['<rootDir>/jest.setup.js'],
collectCoverageFrom: [
'apis/conversion/**/*.{js,jsx}',
'apis/enigma-mocker/**/*.{js,jsx}',
'apis/locale/**/*.{js,jsx}',
'apis/nucleus/**/*.{js,jsx}',
'apis/snapshooter/**/*.{js,jsx}',
'apis/supernova/**/*.{js,jsx}',
'apis/test-utils/**/*.{js,jsx}',
'apis/theme/**/*.{js,jsx}',
'commands/**/*.{js,jsx}',
'packages/ui/**/*.{js,jsx}',
'!apis/enigma-mocker/examples/**',
'!apis/enigma-mocker/index.js',
'!apis/snapshooter/client.js',
'!apis/nucleus/src/flags/*',
'!apis/nucleus/src/contexts/*',
'!apis/nucleus/src/hooks/__tests__/*',
'!apis/test-utils/index.js',
'!apis/nucleus/src/components/selections/__stories__/**',
'!commands/create/**/*.{js,jsx}',
'!commands/build/command.js',
'!commands/cli/**',
'!commands/sense/command.js',
'!commands/serve/command.js',
'!commands/serve/web/components/Root.jsx',
'!commands/serve/web/components/Visualize/**',
'!commands/serve/web/contexts/**',
'!commands/sense/src/ext.js',
'!commands/sense/src/empty-ext.js',
'!**/lib/**',
'!**/dist/**',
'!**/node_modules/**',
'!**/*.config.js',
'!**/*.conf.js',
],
coverageReporters: ['json', 'lcov', 'text-summary', 'clover'],
reporters: ['default', ['jest-junit', { outputDirectory: 'coverage/junit/' }]],
transformIgnorePatterns: ['/node_modules/(?!@qlik/sdk)'],
moduleNameMapper: {
'd3-color': '<rootDir>/node_modules/d3-color/dist/d3-color.min.js',
},
};
export default config;