-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathjest.config.ts
48 lines (46 loc) · 1.12 KB
/
jest.config.ts
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
36
37
38
39
40
41
42
43
44
45
46
47
48
import type { Config } from "jest";
const config: Config = {
watchPlugins: [
"jest-watch-typeahead/filename",
"jest-watch-typeahead/testname"
],
clearMocks: false,
resetMocks: true,
restoreMocks: false,
verbose: true,
moduleFileExtensions: [
"web.js",
"js",
"web.ts",
"ts",
"tsx",
"jsx",
"json",
"node"
],
roots: ["<rootDir>/src/panel"],
setupFilesAfterEnv: ["<rootDir>/src/panel/setupTests.ts"],
collectCoverageFrom: ["**/*.{js,jsx,ts,tsx}", "!**/*.d.ts"],
testMatch: [
"<rootDir>/src/panel/**/__tests__/**/*.{js,jsx,ts,tsx}",
"<rootDir>/src/panel/**/*.{spec,test}.{js,jsx,ts,tsx}"
],
testEnvironment: "jsdom",
transform: {
"\\.[jt]sx?$": [
"ts-jest",
{
tsconfig: "tsconfig.json"
}
],
"^.+\\.css$": "./config/jest/cssTransform.cjs",
"^(?!.*\\.(js|jsx|mjs|cjs|ts|tsx|css|json)$)":
"./config/jest/fileTransform.cjs"
},
transformIgnorePatterns: [
"[/\\\\]node_modules[/\\\\].+\\.(js|jsx|mjs|cjs|ts|tsx)$",
"^.+\\.module\\.(css|sass|scss)$"
],
modulePaths: ["<rootDir>/src/panel"]
};
export default config;