-
Notifications
You must be signed in to change notification settings - Fork 109
/
jest.config.js
51 lines (51 loc) · 1.2 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
module.exports = {
testRegex: '.*\\.test\\.tsx?$',
moduleNameMapper: {
'\\.css$': '<rootDir>/__mocks__/assets-mock.ts',
'\\.png$': '<rootDir>/__mocks__/assets-mock.ts',
'\\.svg': '<rootDir>/__mocks__/assets-mock.ts',
'\\.xml': '<rootDir>/__mocks__/assets-mock.ts',
'\\.ico': '<rootDir>/__mocks__/assets-mock.ts',
},
transform: {
'^.+\\.tsx?$': 'ts-jest',
},
modulePathIgnorePatterns: [
'<rootDir>/.publish/',
],
moduleFileExtensions: [
'ts',
'tsx',
'js',
'json',
],
setupFiles: [
'<rootDir>/__tests__/setup.ts',
],
collectCoverageFrom: [
'src/**/*.{ts,tsx}',
],
coverageReporters: [
'lcov',
'text',
'clover',
],
coveragePathIgnorePatterns: [
'/node_modules/',
'\\.test\\.tsx$',
'-test\\.tsx$',
'index.ts',
// REMOVE AFTER UPGRADE STYLEGUIDIST
'entrypoint-for-demo.ts',
'polyfills.js',
'\\.d\\.ts$',
'\\.gulpfile\\.js$',
],
snapshotSerializers: [
'enzyme-to-json/serializer',
],
globals: {
window: true,
jest: true,
},
};