-
Notifications
You must be signed in to change notification settings - Fork 2
/
jest.config.js
34 lines (32 loc) · 950 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
const enzyme = require.resolve('./utils/enzyme')
const raf = require.resolve('./utils/raf')
const testFramework = require.resolve('./utils/testFramework')
const coverageEnabled = process.argv.indexOf('--coverage') !== -1
module.exports = {
clearMocks: true,
collectCoverage: coverageEnabled,
collectCoverageFrom: [
'src/**/**.js',
'!src/Tools/**',
'!src/Icons/fa/**',
'!**/__snapshots__/**',
'!**/**.stories.js',
'!**/**Map.js',
'!**/index.js'
],
coverageDirectory: './coverage',
coverageReporters: ['json-summary', 'lcov'],
coverageThreshold: {
global: {
branches: 90,
functions: 95,
lines: 95,
statements: 95
}
},
setupFiles: [raf, enzyme],
setupTestFrameworkScriptFile: testFramework,
snapshotSerializers: [require.resolve('enzyme-to-json/serializer')],
testURL: 'http://localhost/',
transform: { '^.+\\.(js|jsx|mjs)$': '<rootDir>/node_modules/babel-jest' }
}