mirror of https://github.com/aminya/setup-cpp
22 lines
541 B
TypeScript
22 lines
541 B
TypeScript
import type { Config } from "jest"
|
|
|
|
const jestConfig: Config = {
|
|
testMatch: ["**/*.test.ts"],
|
|
testEnvironment: "node",
|
|
extensionsToTreatAsEsm: [".ts", ".tsx", ".jsx"],
|
|
transformIgnorePatterns: [], // transform node_modules
|
|
transform: {
|
|
"^.+\\.(t|j)sx?$": "@swc/jest",
|
|
},
|
|
// resolve js files from ts files
|
|
moduleNameMapper: {
|
|
"(.+)\\.js": "$1",
|
|
},
|
|
// coverage
|
|
collectCoverageFrom: ["src/**/*.{ts,tsx,js,jsx}"],
|
|
coveragePathIgnorePatterns: ["assets", ".css.d.ts"],
|
|
verbose: true,
|
|
}
|
|
|
|
export default jestConfig
|