From 79d4e32b48d52874aa520c0353023ca9660afcac Mon Sep 17 00:00:00 2001 From: Cristian Greco Date: Mon, 29 Jun 2026 11:15:54 +0100 Subject: [PATCH] Stop Jest smoke test from flaking on babel/browserslist load The Jest CommonJS smoke test pulls jest@30.4.2 via `npm exec --yes`, which installs jest and its full transitive tree (including babel and browserslist) into the lockfile-less npx cache on every run. Jest's default transform loads babel-jest -> @babel/core -> browserslist, and an intermittently corrupted browserslist in that cache fails the run with 'SyntaxError: Invalid regular expression' before any test executes. The smoke test is plain CommonJS that Node runs natively, so no transformation is needed. Pass `--transform "{}"` to disable babel-jest entirely, so the browserslist code path is never loaded. Drop the now redundant `--no-cache` flag, which only governed the transform cache. Co-Authored-By: Claude Opus 4.8 --- .github/workflows/checks.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/checks.yml b/.github/workflows/checks.yml index 1d1b48d7a..5b61647d3 100644 --- a/.github/workflows/checks.yml +++ b/.github/workflows/checks.yml @@ -142,7 +142,7 @@ jobs: env: DEBUG: "testcontainers*" - name: Run Jest CommonJS runtime smoke test - run: npm exec --yes --package jest@30.4.2 -- jest --testMatch "**/smoke-test.jest.js" --runInBand --no-cache + run: npm exec --yes --package jest@30.4.2 -- jest --testMatch "**/smoke-test.jest.js" --runInBand --transform "{}" env: DEBUG: "testcontainers*"