test: resolve js files from ts files for tests

This commit is contained in:
Amin Yahyaabadi 2024-08-15 17:12:29 -07:00
parent 382285ae64
commit fce9cac0b5
No known key found for this signature in database
GPG Key ID: F52AF77F636088F0
1 changed files with 4 additions and 0 deletions

View File

@ -8,6 +8,10 @@ const jestConfig: Config = {
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"],