fix: add testing-library/jest-dom matchers for UI tests
- Add @testing-library/jest-dom as dev dependency - Create test-setup.ts to import jest-dom matchers - Configure Vitest to use setup file - All UI package tests now passing Fixes test failures with toHaveTextContent and other DOM matchers. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
parent
03021682ce
commit
4f81564c49
3 changed files with 4 additions and 1 deletions
|
|
@ -32,10 +32,11 @@
|
|||
"@tpmjs/utils": "workspace:*"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@testing-library/jest-dom": "^6.9.1",
|
||||
"@testing-library/react": "^16.3.0",
|
||||
"@tpmjs/eslint-config": "workspace:*",
|
||||
"@tpmjs/test": "workspace:*",
|
||||
"@tpmjs/tsconfig": "workspace:*",
|
||||
"@testing-library/react": "^16.3.0",
|
||||
"@types/react": "^19.0.2",
|
||||
"@types/react-dom": "^19.0.2",
|
||||
"happy-dom": "^15.11.7",
|
||||
|
|
|
|||
1
packages/ui/src/test-setup.ts
Normal file
1
packages/ui/src/test-setup.ts
Normal file
|
|
@ -0,0 +1 @@
|
|||
import '@testing-library/jest-dom/vitest';
|
||||
|
|
@ -4,5 +4,6 @@ export default defineConfig({
|
|||
test: {
|
||||
globals: true,
|
||||
environment: 'happy-dom',
|
||||
setupFiles: ['./src/test-setup.ts'],
|
||||
},
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue