-
Notifications
You must be signed in to change notification settings - Fork 1
/
jest.config.js
45 lines (44 loc) · 1.24 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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
require("dotenv").config();
const Config = require("./server/lib/config");
module.exports = exports = {
collectCoverageFrom: [
"app/**/*.js",
"!app/**/*.test.js",
"!app/*/RbGenerated*/*.js",
"!app/app.js",
"!app/*/*/Loadable.js",
"!app/*/Sandbox/**/*",
"!app/fonts/**",
"!app/utils/test-utils.js",
"shared-lib/**/*.js",
"!shared-lib/**/__test__/**/*.js",
],
coverageThreshold: {
global: {
statements: 98,
branches: 91,
functions: 98,
lines: 98
}
},
moduleDirectories: [
"node_modules",
"app",
"shared-lib",
],
moduleNameMapper: {
".*\\.(css|less|styl|scss|sass)$": "<rootDir>/internals/mocks/cssModule.js",
".*\\.(jpg|jpeg|png|gif|eot|otf|webp|svg|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga)$": "<rootDir>/internals/mocks/image.js"
},
setupFiles: [
"<rootDir>/internals/testing/shim.js",
"<rootDir>/internals/testing/setup.js",
],
setupTestFrameworkScriptFile: "<rootDir>/internals/testing/test-bundler.js",
testRegex: ".*\\.test\\.js$",
resolver: "./internals/jest-resolver",
testEnvironment: "jsdom",
// For some reason, verbose often makes console.logs in tests not visible. Disabling verbose fixes this,
// but is probably not the best thing for tests in general
verbose: Config.app.isDevelopment,
};