This repository has been archived by the owner on Jan 4, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathjest.config.base.js
63 lines (61 loc) · 2.03 KB
/
jest.config.base.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
module.exports = {
preset: 'ts-jest',
testEnvironment: 'node',
roots: ['<rootDir>'],
transform: {
'^.+\\.ts$': 'ts-jest',
'^.+\\.tsx$': 'ts-jest',
},
testRegex: '(/__tests__/.*|(\\.|/)(test|spec))\\.(ts?|tsx?)?$',
moduleFileExtensions: ['js', 'ts', 'tsx', 'json', 'node'],
coveragePathIgnorePatterns: ['(tests/.*.mock).(|ts?|tsx?)$'],
verbose: true,
testPathIgnorePatterns: ['/__snapshots__/', '/.cache/', '/lib/', '/dist/'],
moduleNameMapper: {
'\\.(jpg|jpeg|png|gif|eot|otf|webp|svg|ttf|mp4|webm|wav|mp3|m4a|aac|oga)$':
'../../../config/jest/fileMock.js',
'\\.(css)$': 'identity-obj-proxy',
},
collectCoverage: false,
collectCoverageFrom: ['**/*.{ts,tsx}', '!**/*.d.ts', '!<rootDir>/dist/'],
modulePathIgnorePatterns: [
'/__snapshots__/',
'dummy',
'scripts',
'docs',
'__tests__/lib/',
],
snapshotSerializers: ['jest-emotion'],
globals: {
'process.env.__DEV__': true,
'process.env.__PROD__': false,
'process.env.__BROWSER__': false,
'process.env.__SERVER__': false,
},
};
// module.exports = {
// roots: ['<rootDir>'],
// transform: {
// '^.+\\.ts$': 'ts-jest',
// '^.+\\.tsx$': 'ts-jest',
// },
// testRegex: '(/__tests__/.*|(\\.|/)(test|spec))\\.(ts?|tsx?)?$',
// moduleFileExtensions: ['ts', 'tsx', 'jsx', 'json', 'node'],
// coveragePathIgnorePatterns: ['(tests/.*.mock).(|ts?|tsx?)$'],
// verbose: true,
// testPathIgnorePatterns: ['/__snapshots__/', '<rootDir>/packages/docs/.cache/'],
// moduleNameMapper: {
// '\\.(jpg|jpeg|png|gif|eot|otf|webp|svg|ttf|mp4|webm|wav|mp3|m4a|aac|oga)$': '../../../config/jest/fileMock.js',
// '\\.(css)$': 'identity-obj-proxy',
// },
// collectCoverage: false,
// collectCoverageFrom: ['**/*.{ts,tsx}', '!**/*.d.ts', '!<rootDir>/dist/'],
// modulePathIgnorePatterns: ['/dummy', '/scripts', '/docs/', '__tests__/lib/', '/packages/docs/.cache/'],
// snapshotSerializers: ['jest-emotion'],
// globals: {
// 'process.env.__DEV__': true,
// 'process.env.__PROD__': false,
// 'process.env.__BROWSER__': false,
// 'process.env.__SERVER__': false,
// },
// };