mirror of
https://github.com/hanzoai/trace-js.git
synced 2026-10-30 18:19:26 +00:00
28 lines
922 B
JavaScript
28 lines
922 B
JavaScript
module.exports = {
|
|
roots: ["<rootDir>"],
|
|
testEnvironment: "node",
|
|
transform: {
|
|
"^.+\\.ts?$": [
|
|
"ts-jest",
|
|
{
|
|
tsconfig: {
|
|
lib: ["ES2021", "ES2022.Error", "DOM"], // We need to include DOM for tests
|
|
},
|
|
},
|
|
],
|
|
},
|
|
moduleFileExtensions: ["ts", "js", "json", "node"],
|
|
collectCoverage: true,
|
|
clearMocks: true,
|
|
coverageDirectory: "coverage",
|
|
fakeTimers: { enableGlobally: true },
|
|
transformIgnorePatterns: ["<rootDir>/node_modules/"],
|
|
testPathIgnorePatterns: ["<rootDir>/lib/", "/node_modules/", "/examples/"],
|
|
// we want to depend on the source version in the tests to get correct coverage
|
|
moduleNameMapper: {
|
|
"^(hanzo(?!-server).*)$": "<rootDir>/$1/index",
|
|
},
|
|
// we need to exclude the modules in the examples folder from the module lookup as they would collide
|
|
modulePathIgnorePatterns: ["<rootDir>/examples/", "<rootDir>/hanzo-server/"],
|
|
};
|