-
-
Notifications
You must be signed in to change notification settings - Fork 42
Expand file tree
/
Copy pathjest.config.ts
More file actions
30 lines (27 loc) · 690 Bytes
/
jest.config.ts
File metadata and controls
30 lines (27 loc) · 690 Bytes
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
import type { Config } from "@jest/types";
const appRoot = require("app-root-path");
const config: Config.InitialOptions = {
globals: {
__basedir: appRoot.toString(),
"ts-jest": {
useESM: true,
},
},
testMatch: ["**/__tests__/runTest.ts"],
transform: {
"^.+\\.(js|jsx)$": "babel-jest",
"^.+\\.(ts|tsx)$": "ts-jest",
"node_modules/variables/.+\\.(j|t)sx?$": "ts-jest",
},
transformIgnorePatterns: ["node_modules/(?!variables/.*)"],
moduleNameMapper: {
"^(\\.{1,2}/.*)\\.js$": "$1",
},
testEnvironment: "node",
extensionsToTreatAsEsm: [".ts"],
testTimeout: 10000,
verbose: true,
cache: false,
preset: "ts-jest/presets/default-esm",
};
export default config;