From 7f1202282f309eecdf2273d5ad250ebf50cb4766 Mon Sep 17 00:00:00 2001 From: Kurt von Laven Date: Fri, 24 Feb 2023 19:08:22 -0800 Subject: [PATCH] test(jest.config): Stop transforming *.js files Jest only runs on the *.ts files in the src directory, so there have never been any *.js source files for ts-jest to transform. tsc and @vercel/ncc generate *.js output files in the build and dist directories, respectively, but ts-jest doesn't transform these. --- jest.config.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jest.config.ts b/jest.config.ts index 44189ee1..9fea58ea 100644 --- a/jest.config.ts +++ b/jest.config.ts @@ -19,7 +19,7 @@ const config: JestConfigWithTsJest = { // See https://kulshekhar.github.io/ts-jest/docs/guides/esm-support#use-esm-presets. preset: "ts-jest/presets/default-esm", transform: { - "^.+\\.[jt]s$": ["ts-jest", { useESM: true }], + "^.+\\.ts$": ["ts-jest", { useESM: true }], }, moduleNameMapper: { "^(\\.{1,2}/.*)\\.js$": "$1",