forked from readmeio/markdown
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathjest.config.js
36 lines (34 loc) · 981 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
36
const browser = require('./jest.browser');
const common = require('./jest.common');
const unit = {
...common,
collectCoverageFrom: ['**/*.{js,jsx}'],
coveragePathIgnorePatterns: [
'<rootDir>/coverage/',
'<rootDir>/dist/',
'<rootDir>/lib',
'<rootDir>/node_modules/',
'<rootDir>/jest.config.js',
'<rootDir>/webpack.*.js',
'<rootDir>/.*rc.js',
'<rootDir>/*/index.js', // ignore helper index files
'<rootDir>/example',
],
coverageReporters: ['json', 'text', 'lcov', 'clover'], // per https://github.com/facebook/jest/issues/9396#issuecomment-573328488
coverageThreshold: {
global: {
branches: 88,
functions: 90,
lines: 90,
statements: 90,
},
},
displayName: 'unit',
setupFilesAfterEnv: ['<rootDir>/jest.setup.js'],
testEnvironment: 'jsdom',
testPathIgnorePatterns: ['/browser/'],
testEnvironmentOptions: {
url: 'http://localhost',
},
};
module.exports = { projects: [unit, browser] };