initial commit
This commit is contained in:
20
jest.config.js
Normal file
20
jest.config.js
Normal file
@@ -0,0 +1,20 @@
|
||||
/** @type {import('ts-jest').JestConfigWithTsJest} */
|
||||
export default {
|
||||
preset: "ts-jest/presets/default-esm", // important for ESM
|
||||
testEnvironment: "node",
|
||||
testPathIgnorePatterns: ["/node_modules/", "/dist/"],
|
||||
globals: {
|
||||
"ts-jest": {
|
||||
useESM: true, // enable ESM in ts-jest
|
||||
tsconfig: "tsconfig.json",
|
||||
},
|
||||
},
|
||||
extensionsToTreatAsEsm: [".ts"], // treat TypeScript files as ESM
|
||||
moduleNameMapper: {
|
||||
"^(\\.{1,2}/.*)\\.js$": "$1", // fix import extensions in ESM
|
||||
},
|
||||
transform: {
|
||||
"^.+\\.tsx?$": ["ts-jest", { useESM: true }],
|
||||
},
|
||||
testTimeout: 50000,
|
||||
};
|
||||
Reference in New Issue
Block a user