Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: add vitest import when extending vitest matchers #646

Merged
merged 1 commit into from
Oct 31, 2024

Conversation

InfiniteXyy
Copy link
Contributor

@InfiniteXyy InfiniteXyy commented Oct 18, 2024

What:
#645
Fix a vitest typing issue when using global mode

Why:
If there is no import of "vitest" in the whole project (for example, vitest is in globalMode), the type merging might not work.

How:
By adding an import of "vitest" when extending the matcher type

reference: https://vitest.dev/guide/extending-matchers.html

Checklist:

  • Documentation
  • Tests
  • Updated Type Definitions
  • Ready to be merged

Copy link
Contributor

@G-Rath G-Rath left a comment

Choose a reason for hiding this comment

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

sorry about this! I think the fix here is right

cc @gnapse

@gnapse gnapse enabled auto-merge (squash) October 31, 2024 15:07
@gnapse gnapse merged commit 5ba0156 into testing-library:main Oct 31, 2024
5 checks passed
Copy link

🎉 This PR is included in version 6.6.3 🎉

The release is available on:

Your semantic-release bot 📦🚀

@gnapse
Copy link
Member

gnapse commented Oct 31, 2024

@all-contributors please add @InfiniteXyy for code, bug

Copy link
Contributor

@gnapse

I've put up a pull request to add @InfiniteXyy! 🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants