Skip to content

Commit 3b34f34

Browse files
Fix Jest configuration for workspace and testing library setup
- Convert jest.config.js to jest.config.mjs for ES module compatibility - Add setupFilesAfterEnv: ['@testing-library/jest-dom'] for custom matchers - Resolves toBeInTheDocument TypeScript errors in test files - Fixes @testing-library/react import resolution issues - All JavaScript tests now pass on Node 20/22 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
1 parent 4417277 commit 3b34f34

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

jest.config.js renamed to jest.config.mjs

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

0 commit comments

Comments
 (0)