From fce9cac0b584882fd2ee98be20b2969fab7fabe3 Mon Sep 17 00:00:00 2001 From: Amin Yahyaabadi Date: Thu, 15 Aug 2024 17:12:29 -0700 Subject: [PATCH] test: resolve js files from ts files for tests --- jest.config.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/jest.config.ts b/jest.config.ts index d34b58e9..bf908016 100644 --- a/jest.config.ts +++ b/jest.config.ts @@ -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"],