-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathjest.config.js
29 lines (28 loc) · 1016 Bytes
/
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
const paths = require('./config/paths');
module.exports = {
verbose: true,
setupFiles: ['<rootDir>/node_modules/regenerator-runtime/runtime'],
setupFilesAfterEnv: ['<rootDir>/config/jest/setupTests.js'],
testMatch: [
'<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs,ts,tsx}',
'<rootDir>/src/**/*.(spec|test).{js,jsx,mjs,ts,tsx}',
],
testEnvironment: 'node',
testURL: 'http://localhost',
transform: {
'^.+\\.[t|j]sx?$': '<rootDir>/node_modules/babel-jest',
},
transformIgnorePatterns: ['/node_modules/'],
moduleDirectories: paths.resolveModules,
moduleFileExtensions: ['js', 'json', 'jsx', 'mjs', 'ts', 'tsx'],
moduleNameMapper: {
'\\.(jpg|jpeg|png|gif|eot|otf|webp|svg|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga)$':
'<rootDir>/config/jest/fileMock.js',
'.+\\.(css|styl|less|sass|scss)$':
'<rootDir>/node_modules/jest-css-modules-transform',
},
collectCoverageFrom: [
'src/**/*.{js,jsx,mjs,ts,tsx}',
'!src/**/*.stories.{js,jsx,mjs,ts,tsx}',
],
};