fix: upgrade @testing-library/jest-dom for vitest 2.x type compatibility (#21)

The v6.6.0 module augmentation for vitest's Assertion interface was
broken with vitest 2.x. Upgrading to v6.9.1 fixes the ~47 typecheck
errors (toBeInTheDocument, toHaveAttribute). Also adds vitest.d.ts to
ensure the type augmentation is included in tsc compilation.

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
prateek 2026-02-14 14:40:44 +05:30 committed by GitHub
parent 343c8a65b5
commit e450fed462
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 5 additions and 4 deletions

View File

@ -23,16 +23,16 @@
},
"devDependencies": {
"@tailwindcss/postcss": "^4.0.0",
"@testing-library/jest-dom": "^6.6.0",
"@testing-library/jest-dom": "^6.9.1",
"@testing-library/react": "^16.1.0",
"@types/react": "^19.0.0",
"@types/react-dom": "^19.0.0",
"@vitejs/plugin-react": "^4.3.0",
"jsdom": "^25.0.0",
"tailwindcss": "^4.0.0",
"typescript": "^5.7.0",
"playwright": "^1.49.0",
"tailwindcss": "^4.0.0",
"tsx": "^4.19.0",
"typescript": "^5.7.0",
"vitest": "^2.1.0"
}
}

1
packages/web/src/vitest.d.ts vendored Normal file
View File

@ -0,0 +1 @@
import "@testing-library/jest-dom/vitest";

View File

@ -338,7 +338,7 @@ importers:
specifier: ^4.0.0
version: 4.1.18
'@testing-library/jest-dom':
specifier: ^6.6.0
specifier: ^6.9.1
version: 6.9.1
'@testing-library/react':
specifier: ^16.1.0