-
Notifications
You must be signed in to change notification settings - Fork 2
/
jest.config.js
35 lines (33 loc) · 1.32 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
const { jestConfig } = require("@salesforce/sfdx-lwc-jest/config");
const ro = require("resize-observer-polyfill");
const setupFilesAfterEnv = jestConfig.setupFilesAfterEnv || [];
setupFilesAfterEnv.push("<rootDir>/jest-sa11y-setup.js");
setupFilesAfterEnv.push("<rootDir>/jest-crypto-setup.js");
setupFilesAfterEnv.push("<rootDir>/jest-CSS-setup.js");
module.exports = {
...jestConfig,
verbose: true,
modulePathIgnorePatterns: ["<rootDir>/.localdevserver", "sfGpsTemp"],
setupFilesAfterEnv,
moduleFileExtensions: ["js", "html", "css"],
transform: {
"^.+\\.(js|html|css)$": "@lwc/jest-transformer"
},
moduleNameMapper: {
"^@salesforce/apex$": "<rootDir>/__test__/jest-mocks/apex",
"^@salesforce/community/(.*)": "<rootDir>/__test__/jest-mocks/community/$1",
"^omnistudio/omniscriptBaseMixin$":
"<rootDir>/__test__/jest-mocks/omnistudio/omniscriptBaseMixin",
"^omnistudio/radioGroup$":
"<rootDir>/__test__/jest-mocks/omnistudio/radioGroup",
"^lightning/combobox$":
"<rootDir>/__test__/jest-mocks/lightning/combobox/combobox",
"^lightning/primitiveIcon$":
"<rootDir>/__test__/jest-mocks/lightning/primitiveIcon/primitiveIcon",
"^lightning/(.*)":
"<rootDir>/node_modules/@salesforce/sfdx-lwc-jest/src/lightning-stubs/$1/$1"
},
globals: {
ResizeObserver: ro
}
};