Restrict root Jest to backend/__tests__ only — stop scanning frontend

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.
This commit is contained in:
Jordan Ramos
2026-06-16 16:17:57 -06:00
parent 55a4d299ef
commit 8b985a21f8

View File

@@ -25,5 +25,14 @@
"devDependencies": {
"fast-check": "^4.8.0",
"jest": "^30.3.0"
},
"jest": {
"roots": [
"<rootDir>/backend/__tests__"
],
"testPathIgnorePatterns": [
"/node_modules/",
"integration"
]
}
}