Skip to content

fix(tests): Add Vitest type definitions for jest-dom matchers#41

Merged
garrity-miepub merged 2 commits intomainfrom
fix/vitest-jest-dom-types
Jan 30, 2026
Merged

fix(tests): Add Vitest type definitions for jest-dom matchers#41
garrity-miepub merged 2 commits intomainfrom
fix/vitest-jest-dom-types

Conversation

@garrity-miepub
Copy link
Copy Markdown
Contributor

Add vitest.d.ts to extend Vitest Assertion interface with @testing-library/jest-dom matchers (toBeInTheDocument, toHaveClass, toBeDisabled, toHaveAttribute, etc.)

Changes:

  • Add src/test/vitest.d.ts with type augmentation for vitest module
  • Update tsconfig.json to include test files (remove *.test.tsx exclusion)

This resolves TypeScript errors in test files while keeping the runtime setup unchanged. The vitest.d.ts file properly extends Vitest types with TestingLibraryMatchers from jest-dom.

Add vitest.d.ts to extend Vitest Assertion interface with
@testing-library/jest-dom matchers (toBeInTheDocument, toHaveClass,
toBeDisabled, toHaveAttribute, etc.)

Changes:
- Add src/test/vitest.d.ts with type augmentation for vitest module
- Update tsconfig.json to include test files (remove *.test.tsx exclusion)

This resolves TypeScript errors in test files while keeping the
runtime setup unchanged. The vitest.d.ts file properly extends
Vitest types with TestingLibraryMatchers from jest-dom.
Copilot AI review requested due to automatic review settings January 30, 2026 22:33
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot wasn't able to review any files in this pull request.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@garrity-miepub garrity-miepub marked this pull request as ready for review January 30, 2026 22:33
@cloudflare-workers-and-pages
Copy link
Copy Markdown

cloudflare-workers-and-pages bot commented Jan 30, 2026

Deploying ui with  Cloudflare Pages  Cloudflare Pages

Latest commit: cd45750
Status: ✅  Deploy successful!
Preview URL: https://ad99ca2e.ui-6d0.pages.dev
Branch Preview URL: https://fix-vitest-jest-dom-types.ui-6d0.pages.dev

View logs

@garrity-miepub garrity-miepub merged commit 743fc69 into main Jan 30, 2026
10 checks passed
@garrity-miepub garrity-miepub deleted the fix/vitest-jest-dom-types branch January 30, 2026 22:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants