-
Notifications
You must be signed in to change notification settings - Fork 28
/
jest.config.js
30 lines (30 loc) · 970 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
module.exports = {
automock: false,
setupFiles: ["./setupJestMock.js"],
verbose: true,
testRegex: "\\.test\\.jsx?$",
modulePathIgnorePatterns: ["vendor"],
transform: { "\\.[jt]sx?$": "babel-jest" },
// transform: {
// "^.+\\.jsx?$": [
// "esbuild-jest",
// {
// jsx: "preserve",
// loader: { ".js": "jsx" },
// sourcemap: true,
// },
// ],
// },
// see also in config/esbuild/build.js
moduleNameMapper: {
ajax_helper: "<rootDir>/app/javascript/lib/ajax_helper.js",
testHelper: "<rootDir>/app/javascript/test/support/testHelper.js",
"^lib/(.*)$": "<rootDir>/app/javascript/lib/$1",
"^core/(.*)$": "<rootDir>/app/javascript/core/$1",
"^plugins/(.*)$": "<rootDir>/plugins/$1",
"^config/(.*)$": "<rootDir>/config/$1",
},
testEnvironment: "jsdom",
// include juno-ui-components into the transform process
transformIgnorePatterns: ["node_modules/(?!juno-ui-components)"],
}