forked from arb/celebrate
-
Notifications
You must be signed in to change notification settings - Fork 0
/
jest.config.js
30 lines (29 loc) · 888 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
const watchPathIgnorePatterns = ['<rootDir>/node_modules/'];
const testEnvironment = 'node';
module.exports = {
collectCoverage: true,
collectCoverageFrom: ['<rootDir>/lib/index.js'],
coverageDirectory: '<rootDir>/coverage',
coverageThreshold: {
global: {
branches: 100,
functions: 100,
lines: 100,
statements: 100,
},
},
projects: [{
displayName: 'test',
testEnvironment,
// Hack because of broken jest https://github.com/facebook/jest/issues/8088
watchPathIgnorePatterns,
}, {
displayName: 'linter',
runner: 'jest-runner-eslint',
testEnvironment,
testMatch: ['<rootDir>/lib/**/*.js', '<rootDir>/test/**/*.js', '<rootDir>/jest.config.js'],
// Hack because of broken jest https://github.com/facebook/jest/issues/8088
watchPathIgnorePatterns,
}],
watchPlugins: ['jest-runner-eslint/watch-fix'],
};