-
Notifications
You must be signed in to change notification settings - Fork 36
/
jest.config.js
42 lines (42 loc) · 1.09 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
module.exports = {
globals: {
__PATH_PREFIX__: ``,
},
verbose: true,
testTimeout: 10000,
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'],
transform: {
'^.+\\.jsx?$': `<rootDir>/jest-preprocess.js`,
'^.+\\.(ts|tsx)$': 'ts-jest',
},
},
{
displayName: 'utils',
testMatch: ['<rootDir>/tests/utils/*.test.js'],
transform: {
'^.+\\.jsx?$': `<rootDir>/jest-preprocess.js`,
},
},
{
displayName: 'context',
testEnvironment: 'jest-environment-jsdom',
testMatch: ['<rootDir>/tests/context/*.test.js'],
transform: {
'^.+\\.jsx?$': `<rootDir>/jest-preprocess.js`,
},
},
],
};