-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathjest.config.mjs
34 lines (33 loc) · 1.09 KB
/
jest.config.mjs
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
export default {
projects: [
{
displayName: "test",
cacheDirectory: "<rootDir>/jest_cache/",
moduleFileExtensions: ["js", "jsx", "json", "ts", "tsx", "less", "css"],
moduleNameMapper: {
"\\.(svg)$": "<rootDir>/setup/fileMock.js",
"\\.(less|css)$": "identity-obj-proxy",
},
roots: ["<rootDir>/src"],
setupFiles: ["<rootDir>/setup/setup.js"],
setupFilesAfterEnv: ["<rootDir>/setup/setup-test-env.ts"],
testEnvironment: "jest-fixed-jsdom",
testEnvironmentOptions: {
customExportConditions: [''],
},
testMatch: ["**/?(*.)+(spec).+(js|jsx|ts|tsx)"],
testPathIgnorePatterns: [
"/node_modules/",
"/dist/",
"<rootDir>/src/client/tests/",
],
transform: {
"^.+\\.(ts|tsx|js|jsx)?$": "babel-jest",
"^.+.(css|less)$": "jest-transform-stub",
},
transformIgnorePatterns: ["<rootDir>.*(node_modules)(?!.*(nav|uuid|chai).*).*$"],
// ignore tests in tests folder
moduleDirectories: ["node_modules", "src/client", "src/client/app"],
},
],
};