-
Notifications
You must be signed in to change notification settings - Fork 35
Expand file tree
/
Copy pathjest.config.js
More file actions
52 lines (52 loc) · 1.37 KB
/
jest.config.js
File metadata and controls
52 lines (52 loc) · 1.37 KB
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 = {
globals: {
__PATH_PREFIX__: ``,
},
verbose: true,
testTimeout: 15000,
projects: [
{
displayName: 'unit',
preset: 'ts-jest',
globals: {
__PATH_PREFIX__: '',
},
moduleNameMapper: {
'^.+\\.(css)$': 'identity-obj-proxy',
},
setupFilesAfterEnv: ['<rootDir>/tests/testSetup.js'],
snapshotSerializers: ['@emotion/jest/serializer'],
testEnvironment: 'jest-environment-jsdom',
testMatch: [
'<rootDir>/tests/unit/**/*.test.js',
'<rootDir>/tests/unit/**/*.test.tsx',
'<rootDir>/tests/unit/**/*.test.ts',
],
transform: {
'^.+\\.jsx?$': `<rootDir>/jest-preprocess.js`,
'^.+\\.(ts|tsx)$': 'ts-jest',
},
},
{
displayName: 'utils',
testMatch: ['<rootDir>/tests/utils/*.test.js', '<rootDir>/tests/utils/*.test.ts'],
transform: {
'^.+\\.jsx?$': `<rootDir>/jest-preprocess.js`,
'^.+\\.(ts|tsx)$': 'ts-jest',
},
},
{
displayName: 'context',
testEnvironment: 'jest-environment-jsdom',
testMatch: [
'<rootDir>/tests/context/*.test.js',
'<rootDir>/tests/context/*.test.ts',
'<rootDir>/tests/context/*.test.tsx',
],
transform: {
'^.+\\.jsx?$': `<rootDir>/jest-preprocess.js`,
'^.+\\.(ts|tsx)$': 'ts-jest',
},
},
],
};