forked from chrismaltby/gb-studio
-
Notifications
You must be signed in to change notification settings - Fork 0
/
jest.config.js
33 lines (33 loc) · 1.12 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
module.exports = {
preset: "ts-jest",
testEnvironment: "node",
roots: ["<rootDir>/src", "<rootDir>/test"],
moduleFileExtensions: ["ts", "tsx", "js", "jsx", "json", "node"],
setupFilesAfterEnv: ["jest-extended", "./test/setup.ts"],
collectCoverageFrom: [
"src/**/*.{js,jsx,ts,tsx}",
"!src/**/*.d.ts",
"!src/**/vendor/**",
"!src/**/*.stories.{js,jsx,ts,tsx}",
],
transform: {
"\\.[jt]sx?$": "ts-jest",
},
moduleNameMapper: {
// Mocks
"^!!raw-loader!(.*)\\.css$": "<rootDir>/test/__mocks__/styleMock.js",
"^renderer/lib/api": "<rootDir>/test/__mocks__/apiMock.ts",
// Event imports
"^../helpers/l10n$": "<rootDir>/src/shared/lib/lang/l10n.ts",
// Path aliases
consts: "<rootDir>/src/consts.ts",
"^store/(.*)$": "<rootDir>/src/store/$1",
"^components/(.*)$": "<rootDir>/src/components/$1",
"^lang/(.*)$": "<rootDir>/src/lang/$1",
"^lib/(.*)$": "<rootDir>/src/lib/$1",
"^ui(.*)$": "<rootDir>/src/components/ui/$1",
"^renderer(.*)$": "<rootDir>/src/renderer/$1",
"^shared(.*)$": "<rootDir>/src/shared/$1",
"patrons.json": "<rootDir>/patrons.json",
},
};