Skip to content

Update TextInput tests from Jest to Vitest #6406

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

Closed
wants to merge 2 commits into from
Closed

Conversation

Copilot
Copy link
Contributor

@Copilot Copilot AI commented Jul 28, 2025

This PR completes the migration of TextInput component tests from Jest to Vitest as part of the broader test suite migration effort.

Changes Made

The TextInput tests were already largely migrated to Vitest, but required some cleanup to fully complete the migration:

TextInputWithTokens.test.tsx

  • Cleaned up redundant imports: Removed duplicate render as HTMLRender import that was importing both render and render as HTMLRender from the same module
  • Standardized render usage: Replaced all instances of HTMLRender() with the standard render() function from @testing-library/react
  • Applied code formatting: Ran prettier to ensure consistent formatting

TextInput.test.tsx

  • No changes needed: Already properly using Vitest imports and patterns

Verification

  • ✅ Both test files are included in vitest.config.browser.mts include list
  • ✅ Both test files are excluded from jest.config.js modulePathIgnorePatterns
  • ✅ All 60 tests pass (31 for TextInput + 29 for TextInputWithTokens)
  • ✅ No ESLint errors
  • ✅ Code formatted with Prettier

The migration preserves all existing test functionality while cleaning up the import structure to use consistent patterns with other migrated components.

Fixes #6384.


💬 Share your feedback on Copilot coding agent for the chance to win a $200 gift card! Click here to start the survey.

Copy link

changeset-bot bot commented Jul 28, 2025

⚠️ No Changeset found

Latest commit: fc9bc4e

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 Copilot AI changed the title [WIP] Update TextInput tests from Jest to Vitest Update TextInput tests from Jest to Vitest Jul 28, 2025
@Copilot Copilot AI requested a review from joshblack July 28, 2025 20:01
Copilot finished work on behalf of joshblack July 28, 2025 20:01
@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 29, 2025
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 requested a deployment to storybook-preview-6406 July 29, 2025 15:16 Abandoned
Copy link
Contributor

github-actions bot commented Jul 29, 2025

size-limit report 📦

Path Size
packages/react/dist/browser.esm.js 92.2 KB (-0.08% 🔽)
packages/react/dist/browser.umd.js 92.55 KB (+0.12% 🔺)

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 TextInput tests from Jest to Vitest
2 participants