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:
@@ -25,5 +25,14 @@
|
|||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"fast-check": "^4.8.0",
|
"fast-check": "^4.8.0",
|
||||||
"jest": "^30.3.0"
|
"jest": "^30.3.0"
|
||||||
|
},
|
||||||
|
"jest": {
|
||||||
|
"roots": [
|
||||||
|
"<rootDir>/backend/__tests__"
|
||||||
|
],
|
||||||
|
"testPathIgnorePatterns": [
|
||||||
|
"/node_modules/",
|
||||||
|
"integration"
|
||||||
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user