-
Notifications
You must be signed in to change notification settings - Fork 12
Expand file tree
/
Copy pathjest.config.js
More file actions
32 lines (32 loc) · 793 Bytes
/
jest.config.js
File metadata and controls
32 lines (32 loc) · 793 Bytes
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
module.exports = {
testEnvironment: 'jsdom',
setupFilesAfterEnv: ['@testing-library/jest-dom', 'jest-canvas-mock'],
moduleFileExtensions: ['js', 'jsx', 'ts', 'tsx'],
transform: {
'^.+\\.(js|jsx|ts|tsx)$': 'babel-jest',
},
testMatch: [
'<rootDir>/src/**/__tests__/**/*.(js|jsx)',
'<rootDir>/src/**/?(*.)(test|spec).(js|jsx)',
],
collectCoverageFrom: [
'src/**/*.{js,jsx}',
'!src/**/*.test.{js,jsx}',
'!src/**/tests/**',
'!**/node_modules/**',
],
coverageThreshold: {
global: {
branches: 44,
functions: 75,
lines: 60,
statements: 57,
},
},
coverageReporters: ['text', 'lcov', 'html'],
clearMocks: true,
restoreMocks: true,
moduleNameMapper: {
'\\.(css|less|scss|sass)$': 'identity-obj-proxy',
},
};