forked from JustFixNYC/tenants2
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathjest.config.js
More file actions
26 lines (25 loc) · 899 Bytes
/
Copy pathjest.config.js
File metadata and controls
26 lines (25 loc) · 899 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
const path = require("path");
module.exports = {
testURL: "http://localhost",
roots: ["frontend"],
collectCoverage: true,
coveragePathIgnorePatterns: [
"/node_modules/",
"safe-mode-globals.d.ts",
"webpack-defined-globals.d.ts",
"/frontend/vendor/",
"/locales/",
],
transformIgnorePatterns: ["/node_modules/(?!@justfixnyc).+\\.js$"],
watchPathIgnorePatterns: ["<rootDir>/frontend/lib/queries/__generated__/"],
coverageReporters: ["lcov", "html"],
coverageDirectory: "./coverage/jest/",
testRegex: "((\\.|/)(test|spec))\\.(jsx?|tsx?)$",
moduleFileExtensions: ["ts", "tsx", "js", "jsx", "json", "node"],
moduleNameMapper: {
"\\.svg$": path.join(__dirname, "frontend", "mocks", "svg-mock.js"),
"\\.css$": path.join(__dirname, "frontend", "mocks", "css-mock.js"),
},
restoreMocks: true,
setupFilesAfterEnv: ["./frontend/lib/tests/setup.ts"],
};