-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathjest.config.js
29 lines (28 loc) · 1.02 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
// For a detailed explanation regarding each configuration property, visit:
// https://jestjs.io/docs/en/configuration.html
module.exports = {
coverageDirectory: 'coverage',
snapshotSerializers: ['enzyme-to-json/serializer'],
testMatch: ['**/?(*.)test.ts?(x)'],
setupFiles: ['./src/setupTests.ts'],
transform: {
"^.+\\.(js|jsx|ts|tsx)$": "<rootDir>/node_modules/ts-jest"
},
transformIgnorePatterns: [
'[/\\\\]node_modules[/\\\\].+\\.(js|jsx|ts|tsx)$',
'^.+\\.module\\.(css|sass|scss)$',
],
moduleNameMapper: {
'\\.(jpg|jpeg|png|gif|eot|otf|webp|svg|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga)$': '<rootDir>/src/assetsTransformer.js',
'\\.(css|scss)$': '<rootDir>/src/assetsTransformer.js',
},
collectCoverageFrom: [
'src/**/*.{js,jsx,ts,tsx}',
'!<rootDir>/src/serviceWorker.ts',
'!<rootDir>/src/react-app-env.d.ts',
'!<rootDir>/src/setupTests.js',
'!<rootDir>/src/**/*.stories.js',
'!<rootDir>/src/assetsTransformer.js',
],
moduleDirectories: ['node_modules', 'src']
};