-
-
Notifications
You must be signed in to change notification settings - Fork 78
/
Copy pathjest.config.ts
35 lines (26 loc) · 906 Bytes
/
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
import type { Config } from "@jest/types";
const projectRootPath = "<rootDir>/../..";
const solidjsPath = `${projectRootPath}/node_modules/solid-js`;
const config: Config.InitialOptions = {
preset: "ts-jest",
globals: {
"ts-jest": {
tsconfig: `<rootDir>/tsconfig.json`,
babelConfig: {
presets: ["@babel/preset-env", "babel-preset-solid"],
},
},
},
testEnvironment: "jsdom",
setupFilesAfterEnv: ["@testing-library/jest-dom", "regenerator-runtime"],
moduleNameMapper: {
"solid-js/web": `${solidjsPath}/web/dist/web.cjs`,
"solid-js/store": `${solidjsPath}/store/dist/store.cjs`,
"solid-js/h/jsx-runtime": `${solidjsPath}/h/jsx-runtime/dist/jsx.cjs`,
"solid-js/h": `${solidjsPath}/h/dist/h.cjs`,
"solid-js": `${solidjsPath}/dist/solid.cjs`,
},
testPathIgnorePatterns: ["/node_modules/"],
verbose: true,
};
export default config;