-
Notifications
You must be signed in to change notification settings - Fork 34
/
jest.config.js
52 lines (52 loc) · 1.48 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
module.exports = {
'testEnvironment': 'jsdom',
'resolver': 'jest-pnp-resolver',
'moduleNameMapper': {
'\\.(css|less)$': 'identity-obj-proxy'
},
'transform': {
'^.+\\.tsx?$': 'ts-jest'
},
'testRegex': '(/__tests__/.*(spec))\\.(tsx?)$',
'transformIgnorePatterns': [
'[/\\\\]node_modules[/\\\\].+\\.(js|jsx)$',
'^.+\\.module\\.(css|less)$'
],
'moduleFileExtensions': [
'ts',
'tsx',
'js',
'json'
],
'modulePathIgnorePatterns': [
'<rootDir>/build/',
'<rootDir>/.yarn-cache/v2/', // ignore yarn cache to make it pass Altus CI
"<rootDir>/build-ebay/", // ignore build-ebay injected on CI
],
// A set of global variables that need to be available in all test environments
globals: {
'ts-jest': {
diagnostics: false, // hide non-essential info
isolatedModules: true // skip type checks
}
},
reporters: [
'default',
'jest-junit'
],
'collectCoverageFrom': [
'src/**/*.{ts,tsx}',
'!**/__tests__/**/*.{ts,tsx}', // exclude test files
'!src/components/*/index.ts', // exclude components re-exporter file
'!src/**/*.stories.tsx',
'!src/**/index.d.ts',
'!src/config.ts',
'!**/node_modules/**'
],
'coverageReporters': [
'json', 'lcov', 'text', 'cobertura'
],
setupFilesAfterEnv: [
'<rootDir>/config/jest/setup-tests.ts'
]
}