forked from waldur/waldur-homeport
-
Notifications
You must be signed in to change notification settings - Fork 0
/
jest.config.js
36 lines (36 loc) · 1 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 = {
transform: {
'^.+\\.(tsx?|jsx?)$': [
'ts-jest',
{
diagnostics: {
ignoreCodes: [151001],
},
},
],
'^.+\\.svg$': '<rootDir>/test/svgTransform.js',
'^.+\\.png$': '<rootDir>/test/pngTransform.js',
},
transformIgnorePatterns: ['node_modules/(?!axios/.*)'],
testRegex: '\\.spec\\.tsx?$',
moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'json'],
moduleNameMapper: {
'@waldur/(.*)': '<rootDir>/src/$1',
'\\.(css|scss|svg)$': '<rootDir>/test/style-mock.js',
},
setupFiles: [
'<rootDir>/test/enzyme-setup.js',
'<rootDir>/test/react-setup.js',
'jest-date-mock',
'mock-match-media/jest-setup',
],
modulePathIgnorePatterns: ['<rootDir>/node_modules/', '<rootDir>/cypress/'],
snapshotSerializers: ['enzyme-to-json/serializer'],
coverageReporters: ['cobertura'],
testEnvironment: 'jsdom',
reporters: ['default', 'jest-junit'],
snapshotFormat: {
escapeString: true,
printBasicPrototype: true,
},
};