-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathjest.config.js
35 lines (34 loc) · 973 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
30
31
32
33
34
35
const path = require('path');
module.exports = {
testEnvironment: 'jsdom',
testMatch: ['**/*.(test|spec).+(js|jsx)'],
collectCoverage: true,
collectCoverageFrom: [
'src/**/*.{js,jsx}',
'!**node_modules/**',
'!src/**/**.styles.js',
'!src/**/**.spec.{js,jsx}'
],
coverageDirectory: 'coverage',
coverageThreshold: {
global: {
branches: 100,
functions: 100,
lines: 100,
statements: 100
}
},
transform: {
'^.+\\.(js|jsx)$': [
'babel-jest',
{ configFile: './testConfig/babel.config.json' }
]
},
clearMocks: true,
transformIgnorePatterns: [],
setupFilesAfterEnv: ['<rootDir>/testConfig/setupTests.js'],
moduleNameMapper: {
'\\.(css|less|sass|scss)$': path.resolve('./__mocks__/styleMock.js'),
'\\.(gif|ttf|eot|svg|png)$': path.resolve('./__mocks__/fileMock.js')
}
};