forked from opensafely-core/job-server
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathjest.config.js
30 lines (30 loc) · 926 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
/** @type {import('@jest/types').Config.InitialOptions} */
module.exports = async () => ({
collectCoverageFrom: [
"**/*.{js,jsx}",
"!**/node_modules/**",
"!**/vendor/**",
"!<rootDir>/assets/src/scripts/outputs-viewer/tests/*",
"!<rootDir>/assets/src/scripts/outputs-viewer/index.jsx",
"!<rootDir>/assets/src/scripts/outputs-viewer/context/FilesProvider.jsx",
],
coverageThreshold: {
global: {
branches: 90,
functions: 90,
lines: 90,
statements: -10,
},
},
moduleNameMapper: {
"\\.(css|jpg|png|scss)$":
"<rootDir>/assets/src/scripts/outputs-viewer/tests/empty-module.js",
},
roots: ["<rootDir>/assets/src/scripts/outputs-viewer"],
setupFilesAfterEnv: [
"regenerator-runtime/runtime",
"window-resizeto/polyfill",
"<rootDir>/assets/src/scripts/outputs-viewer/tests/jest-setup.js",
],
testEnvironment: "jest-environment-jsdom",
});