From 2e72a24d13767633480dfb3b1701e5b6425ddef5 Mon Sep 17 00:00:00 2001 From: claude_code Date: Fri, 26 Jun 2026 19:45:37 +0300 Subject: [PATCH] test(e2e): silence ts-jest allowJs warnings for editor-ext .js MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The e2e transform matches .js (required so ESM-only node_modules like nanoid/@sindresorhus get transpiled), which also sweeps in editor-ext's prebuilt CommonJS dist/*.js. ts-jest then warns "Got a .js file to compile while allowJs is not set to true" for each footnote file. The .js match cannot be dropped without reintroducing the ESM load errors, so enable allowJs for ts-jest via an inline tsconfig override (merged with apps/server/tsconfig.json — decorators/paths/module stay intact). Verified locally: 0 allowJs warnings, app still compiles and boots to the Redis connection (no DI/metadata regressions). Co-Authored-By: Claude Opus 4.8 --- apps/server/test/jest-e2e.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/server/test/jest-e2e.json b/apps/server/test/jest-e2e.json index b8532df0..c7a61c13 100644 --- a/apps/server/test/jest-e2e.json +++ b/apps/server/test/jest-e2e.json @@ -4,7 +4,7 @@ "testEnvironment": "node", "testRegex": ".e2e-spec.ts$", "transform": { - "^.+\\.(t|j)sx?$": "ts-jest" + "^.+\\.(t|j)sx?$": ["ts-jest", { "tsconfig": { "allowJs": true } }] }, "transformIgnorePatterns": [ "/node_modules/(?!(\\.pnpm/)?(nanoid|uuid|image-dimensions|marked|happy-dom|lib0|@sindresorhus[+/][a-z0-9-]+|escape-string-regexp|p-limit|yocto-queue)(@|/))"