-
Notifications
You must be signed in to change notification settings - Fork 616
refactor: update live-region and utils tests from Jest to Vitest #6157
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
Conversation
|
👋 Hi, this pull request contains changes to the source code that github/github depends on. If you are GitHub staff, we recommend testing these changes with github/github using the integration workflow. Thanks! |
size-limit report 📦
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR migrates live-region and utils tests from Jest to Vitest and updates related configs and helpers.
- Added Vitest matching patterns for live-region and utils tests
- Converted
warning
andinvariant
tests to use Vitest APIs and wrapped them indescribe
blocks - Introduced a
test-helpers.ts
for live-region tests and updated Aria component tests accordingly - Updated Jest config to exclude/match the new test locations
Reviewed Changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated 4 comments.
Show a summary per file
File | Description |
---|---|
vitest.config.mts | Added patterns for live-region and utils tests |
src/utils/tests/warning.test.ts | Replaced jest.spyOn with vi.spyOn , added describe wrapper |
src/utils/tests/invariant.test.ts | Added Vitest imports and describe wrapper |
src/live-region/tests/test-helpers.ts | New helper to query the live-region element |
src/live-region/tests/*.test.tsx | Updated imports to Vitest, use local test-helpers , adjusted style assertions |
jest.config.js | Added live-region & utils tests to Jest matching patterns |
Update live region and utils test from Jest to Vitest
Changelog
New
Changed
Removed