jest-dom
jest-dom copied to clipboard
fix: add vitest import when extending vitest matchers
What: https://github.com/testing-library/jest-dom/issues/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
- [x] Updated Type Definitions
- [ ] Ready to be merged