Skip to content

chore: update vitest, add node config and disable screenshots #6159

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

joshblack
Copy link
Member

Update vitest to 3.2.0, including migrating from the deprecated "workspaces" config to the new "projects". This also adds support for running tests in a Node.js environment, where appropriate, along with disabling screenshots on failure.

Changelog

New

  • Add support for Node.js-based vitest tests in packages/react

Changed

  • Update vitest to 3.2.0
  • Update workspaces config to use projects
  • Update exports.test.ts to be in vitest

Removed

@Copilot Copilot AI review requested due to automatic review settings June 3, 2025 15:43
@joshblack joshblack requested a review from a team as a code owner June 3, 2025 15:43
@joshblack joshblack requested a review from jonrohan June 3, 2025 15:43
Copy link

changeset-bot bot commented Jun 3, 2025

⚠️ No Changeset found

Latest commit: 974bdd7

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

@joshblack joshblack added the skip changeset This change does not need a changelog label Jun 3, 2025
@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 Jun 3, 2025
Copy link
Contributor

github-actions bot commented Jun 3, 2025

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

Copy link
Contributor

@Copilot 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 upgrades Vitest to v3.2.0, replaces the deprecated workspaces config with projects, and splits tests into Node and browser environments—disabling screenshots on failure in browser tests.

  • Switch root Vitest config from workspace to projects and include vitest.config.browser.mts
  • Add a Node-focused Vitest config in packages/react for exports.test.ts
  • Create a browser-specific Vitest config with React plugin and screenshotFailures: false
  • Update snapshot files for Vitest format and bump Vitest-related deps in package.json

Reviewed Changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated no comments.

Show a summary per file
File Description
vitest.config.mts Migrated workspaceprojects, added browser config entry
packages/react/vitest.config.mts Defined Node-only project for exports.test.ts
packages/react/vitest.config.browser.mts New browser-based config with React plugin & disabled screenshots
packages/react/src/tests/exports.test.ts Imported Vitest globals for Node test
packages/react/src/tests/snapshots/exports.test.ts.snap Updated snapshot header and keys to Vitest conventions
packages/react/jest.config.js Ignore exports.test.ts in Jest
package.json Bumped vitest and @vitest/browser versions

Copy link
Contributor

github-actions bot commented Jun 3, 2025

size-limit report 📦

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

@joshblack joshblack added this pull request to the merge queue Jun 3, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to a conflict with the base branch Jun 3, 2025
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.

2 participants