-
Notifications
You must be signed in to change notification settings - Fork 14
/
Copy pathjest.config.js
50 lines (38 loc) · 1021 Bytes
/
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
/** @type {import('ts-jest').InitialOptionsTsJest} */
module.exports = {
verbose: true,
forceExit: true,
bail: false,
transform: {
'^.+\\.[tj]sx?$': [
'ts-jest',
{
tsconfig: {
jsx: 'react',
allowJs: true,
target: 'es6',
lib: ['esnext'],
module: 'commonjs',
moduleResolution: 'bundler',
skipLibCheck: true,
esModuleInterop: true,
noUnusedLocals: false
}
}
]
},
setupFilesAfterEnv: ['<rootDir>/test/setup.ts'],
globalTeardown: '<rootDir>/test/teardown.ts',
testEnvironment: 'node',
moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'json'],
preset: 'ts-jest/presets/js-with-ts',
roots: ['<rootDir>/packages', '<rootDir>/test'],
watchPathIgnorePatterns: ['/fixtures'],
testMatch: [
'<rootDir>/test/**/*.test.[jt]s?(x)',
'**/__tests__/**/*.test.[jt]s?(x)'
],
moduleNameMapper: {
'^shuvi-test-utils(/?.*)$': '<rootDir>/test/utils/$1'
}
};