fix: resolve TS2339 jest-dom matcher errors in homepage tests
Root cause: @vitest/coverage-v8@^4.1.0 forced vitest@4.1.9 into apps/homepage/node_modules, creating two vitest installations (v2 at root, v4 in homepage). @testing-library/jest-dom's vitest.d.ts augmented the root vitest v2 module, but homepage tests imported vitest v4 — so the type augmentation for matchers (toBeDisabled, toHaveAttribute, etc.) never applied. Fix: downgrade @vitest/coverage-v8 from ^4.1.0 to ^2.1.9 to match vitest 2.x used by the rest of the monorepo. This unifies vitest at v2.1.9 across all workspaces, allowing the jest-dom type augmentation to take effect. Validation: - npm ls vitest: single v2.1.9 installation (no nested vitest in homepage) - Homepage type-check (tsc --noEmit): 0 errors (all TS2339 resolved) - Existing setup.ts and vitest.config.ts were already correctly configured
This commit is contained in:
@@ -35,7 +35,7 @@
|
||||
"@types/node": "^20.12.0",
|
||||
"@types/react": "^19.2.0",
|
||||
"@types/react-dom": "^19.2.0",
|
||||
"@vitest/coverage-v8": "^4.1.0",
|
||||
"@vitest/coverage-v8": "^2.1.9",
|
||||
"eslint": "^9.0.0",
|
||||
"eslint-config-next": "^16.2.0",
|
||||
"eslint-config-prettier": "^10.1.0",
|
||||
|
||||
Generated
+190
-1059
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user