-
Notifications
You must be signed in to change notification settings - Fork 1
/
jest.config.js
28 lines (28 loc) · 1.04 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
module.exports = {
testEnvironment: 'node',
resetMocks: true, // clear history and reset behavior of mocks between each test
restoreMocks: true, // restore initial behavior of mocked functions
testPathIgnorePatterns: ['/node_modules/', '/dist/'], // ignore dist folder
collectCoverageFrom: [
'**/*.ts', // test typescript files
'!**/node_modules/**', // do not test node_modules
'!**/__mocks__/**', // do not test jest mocks
'!**/test/**', // do not test any test helpers
'!**/src/**/index.*', // do not test index export files
'!**/src/**/types/**', // do not test local type definitions
'!**/@types/**', // do not test ambient declarations
'!**/index.d.ts', // do not test typescript declaration files
'!**/src/**/constants/**', // do not test shared constants folder
'!dist/**', // do not test compiled output
'!**/scripts/**', // do not test scripts,
'!**/website/**', // do not test docs website
],
coverageThreshold: {
'**/*.?([cm])[jt]s?(x)': {
statements: 25,
branches: 25,
functions: 25,
lines: 25,
},
},
};