-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathjest.config.js
36 lines (36 loc) · 1.36 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
module.exports = {
preset: 'ts-jest',
testEnvironment: 'jsdom',
clearMocks: true,
coverageDirectory: 'coverage',
globals: {
'process.env.NODE_ENV': 'test',
},
transform: {
'^.+\\.(ts|tsx)?$': [
'ts-jest',
{
isolatedModules: true,
diagnostics: {
warnOnly: true,
},
},
],
},
moduleFileExtensions: ['js', 'json', 'jsx', 'ts', 'tsx', 'node'],
moduleNameMapper: {
'^@dark-engine/core(.*)$': '<rootDir>/packages/core/src$1',
'^@dark-engine/platform-browser(.*)$': '<rootDir>/packages/platform-browser/src$1',
'^@dark-engine/platform-server(.*)$': '<rootDir>/packages/platform-server/src$1',
'^@dark-engine/platform-native(.*)$': '<rootDir>/packages/platform-native/src$1',
'^@dark-engine/platform-desktop(.*)$': '<rootDir>/packages/platform-desktop/src$1',
'^@dark-engine/web-router(.*)$': '<rootDir>/packages/web-router/src$1',
'^@dark-engine/native-navigation(.*)$': '<rootDir>/packages/native-navigation/src$1',
'^@dark-engine/animations(.*)$': '<rootDir>/packages/animations/src$1',
'^@dark-engine/styled(.*)$': '<rootDir>/packages/styled/src$1',
'^@dark-engine/data(.*)$': '<rootDir>/packages/data/src$1',
'^@test-utils$': '<rootDir>/test/utils',
},
setupFiles: ['./test/setup.ts'],
testMatch: ['**/__tests__/**/*.[jt]s?(x)', '**/?(*.)+(spec|test).[tj]s?(x)'],
};