Update KeybindingHint tests from Jest to Vitest#6392
Conversation
|
Co-authored-by: joshblack <3901764+joshblack@users.noreply.github.com>
There was a problem hiding this comment.
Pull Request Overview
This PR migrates the KeybindingHint component tests from Jest to Vitest as part of the ongoing test framework migration effort.
- Updated Vitest configuration to include KeybindingHint tests
- Added Vitest test function imports to the test file
- Excluded KeybindingHint from Jest configuration to prevent conflicts
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| packages/react/vitest.config.browser.mts | Added KeybindingHint test pattern to Vitest include configuration |
| packages/react/src/KeybindingHint/KeybindingHint.test.tsx | Added Vitest imports for test functions |
| packages/react/jest.config.js | Added KeybindingHint to Jest ignore patterns |
|
👋 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 📦
|
This PR migrates the KeybindingHint component tests from Jest to Vitest as part of the ongoing test suite migration effort.
Changes Made
vitest.config.browser.mts: Addedsrc/KeybindingHint/**/*.test.?(c|m)[jt]s?(x)to the include configurationjest.config.js: Added<rootDir>/src/KeybindingHint/to the modulePathIgnorePatterns to exclude from JestKeybindingHint.test.tsx: Added Vitest imports (describe,expect,it) while keeping the existing@testing-library/reactimportsValidation
The migration was straightforward as the KeybindingHint tests were already using best practices with
@testing-library/reactand didn't rely on any Jest-specific functionality that needed to be removed.Fixes #6387.
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.