-
Notifications
You must be signed in to change notification settings - Fork 19
/
jest.config.js
executable file
·28 lines (27 loc) · 958 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
const paths = require("./config/paths");
module.exports = {
collectCoverageFrom: ["src/**/*.{js,jsx,mjs}"],
setupFiles: [
"<rootDir>/node_modules/regenerator-runtime/runtime",
"<rootDir>/config/polyfills.js",
],
setupTestFrameworkScriptFile: "<rootDir>config/jest/setup.js",
testMatch: [
"<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}",
"<rootDir>/src/**/?(*.)(spec|test).{js,jsx,mjs}",
],
testEnvironment: "node",
testURL: "http://localhost",
transform: {
"^.+\\.(js|jsx|mjs)$": "<rootDir>/node_modules/babel-jest",
"^.+\\.css$": "<rootDir>/config/jest/cssTransform.js",
"^(?!.*\\.(js|jsx|mjs|css|json)$)":
"<rootDir>/config/jest/fileTransform.js",
},
transformIgnorePatterns: ["[/\\\\]node_modules[/\\\\].+\\.(js|jsx|mjs)$"],
moduleDirectories: paths.resolveModules,
moduleFileExtensions: ["js", "json", "jsx", "node", "mjs"],
moduleNameMapper: {
"\\.(css)$": "identity-obj-proxy",
},
};