-
Notifications
You must be signed in to change notification settings - Fork 610
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
base: main
Are you sure you want to change the base?
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! |
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 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
toprojects
and includevitest.config.browser.mts
- Add a Node-focused Vitest config in
packages/react
forexports.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 workspace → projects , 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 |
size-limit report 📦
|
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
Changed
Removed