-
Notifications
You must be signed in to change notification settings - Fork 43
/
jest.config.js
39 lines (39 loc) · 1.13 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
module.exports = {
setupFilesAfterEnv: ['./jestSetup.ts'],
displayName: 'test',
testURL: 'http://localhost',
testPathIgnorePatterns: [
'<rootDir>/build',
'<rootDir>/node_modules/(?!(jest-test))',
'cypress',
],
modulePaths: ['<rootDir>', '<rootDir>/node_modules'],
moduleDirectories: ['src'],
transform: {
'^.+\\.tsx?$': 'ts-jest',
},
testRegex: '(/__tests__/.*|(\\.|/)(test))\\.(ts?|tsx?)$',
moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'json', 'node'],
moduleNameMapper: {
'\\.(css|scss)$': 'identity-obj-proxy',
'react-dnd$': 'react-dnd/dist/cjs',
'react-dnd-html5-backend$': 'react-dnd-html5-backend/dist/cjs',
'dnd-core$': 'dnd-core/dist/cjs',
},
globals: {
'ts-jest': {
tsconfig: 'tsconfig.test.json',
diagnostics: {
ignoreCodes: [6133, 6192], // ignore unused variable errors
},
},
},
collectCoverageFrom: [
'./src/**/*.{js,jsx,ts,tsx}',
'!./src/**/*.test.{js,jsx,ts,tsx}',
],
coverageDirectory: './coverage',
coverageReporters: ['html', 'cobertura'],
reporters: ['default', 'jest-junit'],
testEnvironment: './jsdom-custom.js',
}