-
Notifications
You must be signed in to change notification settings - Fork 8
/
jest.config.ts
36 lines (27 loc) · 1.05 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
import type { JestConfigWithTsJest } from 'ts-jest'
//import { defaults as tsjPreset } from 'ts-jest/presets'
// import { defaultsESM as tsjPreset } from 'ts-jest/presets';
// import { jsWithTs as tsjPreset } from 'ts-jest/presets';
import { jsWithTsESM as tsjPreset } from 'ts-jest/presets';
// import { jsWithBabel as tsjPreset } from 'ts-jest/presets';
// import { jsWithBabelESM as tsjPreset } from 'ts-jest/presets';
const jestConfig: JestConfigWithTsJest = {
verbose: true,
testEnvironment: "node",
setupFilesAfterEnv: ["jest-extended/all"],
extensionsToTreatAsEsm: [".ts", ".mts", ],
transform: {
...tsjPreset.transform,
// [...]
},
moduleNameMapper: {
"^~lib/(.*)$": "<rootDir>/lib/$1",
"^~test/(.*)$": "<rootDir>/test/$1",
},
}
console.warn("----------------------------------------");
console.warn("----------------------------------------");
console.warn(" NEW TEST RUN");
console.warn("----------------------------------------");
console.warn("----------------------------------------");
export default jestConfig