You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
23 lines
582 B
23 lines
582 B
2 years ago
|
/** @type {import('ts-jest').JestConfigWithTsJest} */
|
||
|
module.exports = {
|
||
|
preset: "ts-jest/presets/default-esm",
|
||
|
testEnvironment: "node",
|
||
|
testTimeout: 120000,
|
||
|
extensionsToTreatAsEsm: [".ts"],
|
||
|
moduleNameMapper: {
|
||
|
"^(\\.{1,2}/.*)\\.js$": "$1",
|
||
|
"#ansi-styles": "ansi-styles/index.js",
|
||
|
"#supports-color": "supports-color/index.js",
|
||
|
},
|
||
|
transform: {
|
||
|
// '^.+\\.[tj]sx?$' to process js/ts with `ts-jest`
|
||
|
// '^.+\\.m?[tj]sx?$' to process js/ts/mjs/mts with `ts-jest`
|
||
|
"^.+\\.tsx?$": [
|
||
|
"ts-jest",
|
||
|
{
|
||
|
useESM: true,
|
||
|
},
|
||
|
],
|
||
|
},
|
||
|
}
|