-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathjest.config.js
More file actions
30 lines (30 loc) · 790 Bytes
/
jest.config.js
File metadata and controls
30 lines (30 loc) · 790 Bytes
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
module.exports = {
testEnvironment: "jsdom",
moduleFileExtensions: ["js"],
transform: {
"^.+\\.js$": "babel-jest",
},
moduleNameMapper: {
// Handle CSS imports in tests
"\\.(css|less|scss)$":
"<rootDir>/milk2meat/frontend/__mocks__/styleMock.js",
},
setupFilesAfterEnv: ["<rootDir>/jest.setup.js"],
testPathIgnorePatterns: ["/node_modules/", "/static/"],
collectCoverage: true,
coverageDirectory: "coverage",
coverageReporters: ["json-summary", "text", "lcov"],
collectCoverageFrom: [
"milk2meat/frontend/js/**/*.js",
"!milk2meat/frontend/js/**/*.test.js",
"!milk2meat/frontend/js/**/__mocks__/**",
],
coverageThreshold: {
global: {
statements: 80,
branches: 65,
functions: 80,
lines: 80,
},
},
};