setup-cpp/jest.config.ts

19 lines
482 B
TypeScript
Raw Normal View History

2023-07-25 04:20:39 +08:00
import type { Config } from "jest"
2023-07-25 04:20:23 +08:00
2023-07-25 04:20:39 +08:00
const jestConfig: Config = {
2023-07-25 04:20:23 +08:00
testMatch: ["**/*.test.ts"],
testEnvironment: "node",
2023-07-25 05:08:07 +08:00
extensionsToTreatAsEsm: [".ts", ".tsx", ".jsx"],
2023-07-25 04:20:23 +08:00
transformIgnorePatterns: [], // transform node_modules
transform: {
2023-07-25 04:20:39 +08:00
"^.+\\.(t|j)sx?$": "@swc/jest",
},
// coverage
2023-07-25 04:20:39 +08:00
collectCoverageFrom: ["src/**/*.{ts,tsx,js,jsx}"],
coveragePathIgnorePatterns: ["assets", ".css.d.ts"],
verbose: true,
detectOpenHandles: true,
}
export default jestConfig