setup-cpp/jest.config.ts

27 lines
641 B
TypeScript
Raw Normal View History

2023-07-25 04:20:23 +08:00
import type { JestConfigWithTsJest } from "ts-jest"
const jestConfig: JestConfigWithTsJest = {
testMatch: ["**/*.test.ts"],
testEnvironment: "node",
// transform configurations
2022-07-06 12:19:58 +08:00
preset: "ts-jest/presets/js-with-ts-esm",
extensionsToTreatAsEsm: [".ts"],
2023-07-25 04:20:23 +08:00
transformIgnorePatterns: [], // transform node_modules
transform: {
"^.+\\.tsx?$": [
"ts-jest",
{
importHelpers: true,
useESM: true,
},
],
},
// coverage
collectCoverageFrom: ["src/**/*.{ts,tsx}"],
coveragePathIgnorePatterns: ["assets", ".css.d.ts"],
verbose: true,
detectOpenHandles: true,
}
export default jestConfig