Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Jul 24, 2025

This PR migrates the KeybindingHint component tests from Jest to Vitest as part of the ongoing test suite migration effort.

Changes Made

  • Updated vitest.config.browser.mts: Added src/KeybindingHint/**/*.test.?(c|m)[jt]s?(x) to the include configuration
  • Updated jest.config.js: Added <rootDir>/src/KeybindingHint/ to the modulePathIgnorePatterns to exclude from Jest
  • Updated KeybindingHint.test.tsx: Added Vitest imports (describe, expect, it) while keeping the existing @testing-library/react imports

Validation

  • ✅ All 19 tests pass with Vitest
  • ✅ Jest no longer picks up these tests (correctly excluded)
  • ✅ No deprecated functions were present (behavesAsComponent, checkExports, toHaveNoViolations, setupMatchMedia)
  • ✅ Code formatting and linting pass

The migration was straightforward as the KeybindingHint tests were already using best practices with @testing-library/react and 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.

@changeset-bot
Copy link

changeset-bot bot commented Jul 24, 2025

⚠️ No Changeset found

Latest commit: 687d778

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

Copilot AI changed the title [WIP] Update KeybindingHint tests from Jest to Vitest Update KeybindingHint tests from Jest to Vitest Jul 24, 2025
Copilot AI requested a review from joshblack July 24, 2025 23:33
Copilot finished work on behalf of joshblack July 24, 2025 23:33
@joshblack joshblack marked this pull request as ready for review July 25, 2025 00:54
Copilot AI review requested due to automatic review settings July 25, 2025 00:54
@joshblack joshblack requested a review from a team as a code owner July 25, 2025 00:54
Copy link
Contributor

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.

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

@github-actions
Copy link
Contributor

👋 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!

@github-actions github-actions bot added the integration-tests: recommended This change needs to be tested for breaking changes. See https://arc.net/l/quote/tdmpakpm label Jul 25, 2025
@joshblack joshblack added the skip changeset This change does not need a changelog label Jul 25, 2025
@github-actions
Copy link
Contributor

size-limit report 📦

Path Size
packages/react/dist/browser.esm.js 92.21 KB (0%)
packages/react/dist/browser.umd.js 92.39 KB (0%)

@joshblack joshblack merged commit fa12777 into main Jul 25, 2025
66 of 69 checks passed
@joshblack joshblack deleted the copilot/fix-6387 branch July 25, 2025 15:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

integration-tests: recommended This change needs to be tested for breaking changes. See https://arc.net/l/quote/tdmpakpm skip changeset This change does not need a changelog

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Update KeybindingHint tests from Jest to Vitest

3 participants