setup-cpp/jest.config.mjs

23 lines
538 B
JavaScript
Raw Normal View History

/**
* @type {import('jest').Config}
*/
const jestConfig = {
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",
},
// resolve js files from ts files
moduleNameMapper: {
"(.+)\\.js": "$1",
},
// coverage
2023-07-25 04:20:39 +08:00
collectCoverageFrom: ["src/**/*.{ts,tsx,js,jsx}"],
coveragePathIgnorePatterns: ["assets", ".css.d.ts"],
verbose: true,
}
export default jestConfig