-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathjest.config.ts
27 lines (26 loc) · 1.08 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
/*
* For a detailed explanation regarding each configuration property and type check, visit:
* https://jestjs.io/docs/configuration
*/
export default {
clearMocks: true,
collectCoverage: true,
collectCoverageFrom: ['<rootDir>/src/**/*.{js,jsx,ts,tsx}'],
coverageDirectory: '<rootDir>/__test__/coverage',
coverageProvider: 'babel',
moduleFileExtensions: ['js', 'jsx', 'ts', 'tsx'],
setupFiles: ['<rootDir>/__test__/setup.js'],
testEnvironment: 'jsdom',
testMatch: ['<rootDir>/**/__test__/**/*.(spec|test).{js,jsx,ts,tsx}'],
transform: {
'^.+\\.(js|jsx|ts|tsx|mjs)$': [
'<rootDir>/node_modules/babel-jest',
{ configFile: './__test__/jest.babelrc' }
],
'^.+\\.m\\.(less|scss)$': '<rootDir>/node_modules/jest-css-modules-transform',
'^.+\\.(css|less|scss)$': '<rootDir>/__test__/cssTransform.js',
'^(?!.*\\.(js|jsx|ts|tsx|css|less|scss|json)$)': '<rootDir>/__test__/fileTransform.js'
},
transformIgnorePatterns: ['<rootDir>/node_modules/(?!lodash-es/).+(js|jsx|ts|tsx|mjs)$'],
coverageReporters: ['json-summary', 'clover', 'json', 'lcov', 'text']
}