-
Notifications
You must be signed in to change notification settings - Fork 0
/
jest.config.js
33 lines (31 loc) · 1.01 KB
/
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
// https://docs.codecov.com/docs/codecov-uploader
/* eslint-disable prefer-destructuring */
const getJestSetup = require('@papillonbits/setup/jest').getJestSetup
const testPathIgnorePatterns = process.env.NODE_ENV === 'test' ? ['packages/core/webpack.test.babel.js'] : ['packages/core']
const coverageDirectory = './.coverage/'
const collectCoverage = process.env.NODE_ENV === 'test'
const collectCoverageFrom = [
'!**/.coverage/**',
'!**/.husky/**',
'!**/.mock/**',
'!**/.storybook/**',
'!**/.storybook-static/**',
'!**/node_modules/**',
'packages/**/*.{js,jsx}',
'!packages/**/index.js',
'!packages/**/*.prop.js',
'!packages/**/*.story.js',
'!packages/**/*.test.js',
'!packages/**/build/**',
'!packages/**/node_modules/**',
'!packages/**/webpack*',
]
const coverageThreshold = {
global: {
statements: 93,
branches: 57,
functions: 95,
lines: 92,
},
}
module.exports = getJestSetup({ testPathIgnorePatterns, coverageDirectory, collectCoverage, collectCoverageFrom, coverageThreshold })