-
Notifications
You must be signed in to change notification settings - Fork 0
/
jest.config.ts
40 lines (39 loc) · 1.26 KB
/
jest.config.ts
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
export default {
collectCoverage: false,
collectCoverageFrom: ['./src/**'],
coverageProvider: 'v8',
coverageDirectory: './test/coverage/',
coverageThreshold: {
global: {
branches: 80,
functions: 80,
lines: 80,
statements: -10
}
},
moduleFileExtensions: ['feature', 'js', 'jsx', 'json', 'ts', 'tsx', 'node'],
testMatch: ['**/test/**/?(*.)+(spec|test|steps).+(ts|tsx|js)'],
transform: {
'^.+\\.(ts|tsx)$': 'ts-jest'
},
setupFiles: ['jest-canvas-mock'],
setupFilesAfterEnv: [
'@testing-library/jest-dom',
'@testing-library/jest-dom/extend-expect'
],
testEnvironmentOptions: {
url: 'http://localhost/'
},
testPathIgnorePatterns: ['/node_modules/', '/dist/'],
testEnvironment: 'jsdom',
moduleNameMapper: {
'^@src/(.*)$': '<rootDir>/src/$1',
'^@components/(.*)$': '<rootDir>/src/components/$1',
'^@entities/(.*)$': '<rootDir>/src/entities/$1',
'^@scenes/(.*)$': '<rootDir>/src/scenes/$1',
'^@systems/(.*)$': '<rootDir>/src/systems/$1',
'^@ui/(.*)$': '<rootDir>/src/ui/$1',
'^@utils/(.*)$': '<rootDir>/src/utils/$1',
'^uuid$': require.resolve('uuid')
}
};