From 8b985a21f8991cfbfd72c12b2195f63b0d187734 Mon Sep 17 00:00:00 2001 From: Jordan Ramos Date: Tue, 16 Jun 2026 16:17:57 -0600 Subject: [PATCH] =?UTF-8?q?Restrict=20root=20Jest=20to=20backend/=5F=5Ftes?= =?UTF-8?q?ts=5F=5F=20only=20=E2=80=94=20stop=20scanning=20frontend?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Jest 30 default test discovery was finding frontend/src/**/*.test.js and __tests__/ files when running from the project root. These need react-scripts (CRA's Babel config) to parse ESM imports and JSX. Added jest.roots to confine root-level Jest to backend tests only. Frontend tests run separately via react-scripts test in test-frontend. --- package.json | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/package.json b/package.json index 784cfeb..2a62d0c 100644 --- a/package.json +++ b/package.json @@ -25,5 +25,14 @@ "devDependencies": { "fast-check": "^4.8.0", "jest": "^30.3.0" + }, + "jest": { + "roots": [ + "/backend/__tests__" + ], + "testPathIgnorePatterns": [ + "/node_modules/", + "integration" + ] } }