Skip to content

Commit 5fd223e

Browse files
Fix Jest setupFilesAfterEnv path resolution for CI
- Use explicit path <rootDir>/node_modules/@testing-library/jest-dom - Resolves module resolution issues when Jest runs from workspace directory - Fixes "Module @testing-library/jest-dom was not found" error in CI 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
1 parent 3b34f34 commit 5fd223e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

jest.config.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ export default {
1414
}),
1515
testEnvironment: 'jsdom',
1616
setupFiles: ['<rootDir>/node_package/tests/jest.setup.js'],
17-
setupFilesAfterEnv: ['@testing-library/jest-dom'],
17+
setupFilesAfterEnv: ['<rootDir>/node_modules/@testing-library/jest-dom'],
1818
// React Server Components tests require React 19 and only run with Node version 18 (`newest` in our CI matrix)
1919
moduleNameMapper:
2020
nodeVersion < 18

0 commit comments

Comments
 (0)