Skip to content

fix(vitest): support multi browser instance setups#332

Open
AriPerkkio wants to merge 1 commit intomainfrom
ari/fix-multi-browser-instance-setup
Open

fix(vitest): support multi browser instance setups#332
AriPerkkio wants to merge 1 commit intomainfrom
ari/fix-multi-browser-instance-setup

Conversation

@AriPerkkio
Copy link
Copy Markdown
Member

@AriPerkkio AriPerkkio commented May 4, 2026

Issue: #295

What Changed

Support cases where user defines multiple browser instances:

browser: {
  instances: [{ browser: 'chromium' }, { browser: 'webkit' }, { browser: 'firefox' }],
},

How to test

@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented May 4, 2026

🦋 Changeset detected

Latest commit: a625dc7

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@chromatic-com/vitest Patch

Not sure what this means? Click here to learn what changesets are.

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

@AriPerkkio AriPerkkio changed the title test: add failing test fix(vitest): support multi browser instance setups May 4, 2026
@AriPerkkio AriPerkkio force-pushed the ari/fix-multi-browser-instance-setup branch from 7ef1be4 to ec81fd0 Compare May 5, 2026 07:43
Comment on lines +53 to +54
// browser.name is instances[].browser, not instances[].name: https://github.com/vitest-dev/vitest/blob/d22b029ae056b9515033d75c1249e9db26612770/packages/vitest/src/node/projects/resolveProjects.ts#L307
if (!browser.enabled || browser.name !== 'chromium') {
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@AriPerkkio AriPerkkio force-pushed the ari/fix-multi-browser-instance-setup branch 2 times, most recently from 67c1d65 to 0533fac Compare May 5, 2026 07:55
@codecov
Copy link
Copy Markdown

codecov Bot commented May 5, 2026

Codecov Report

❌ Patch coverage is 72.72727% with 3 lines in your changes missing coverage. Please review.
✅ Project coverage is 90.66%. Comparing base (f3c5a90) to head (a625dc7).

Files with missing lines Patch % Lines
packages/vitest/src/browser/public/autoSnapshot.ts 50.00% 1 Missing ⚠️
packages/vitest/src/browser/public/takeSnapshot.ts 50.00% 1 Missing ⚠️
...es/vitest/src/browser/public/waitForIdleNetwork.ts 50.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #332      +/-   ##
==========================================
- Coverage   91.00%   90.66%   -0.35%     
==========================================
  Files          22       23       +1     
  Lines         634      643       +9     
  Branches      118      121       +3     
==========================================
+ Hits          577      583       +6     
- Misses         54       57       +3     
  Partials        3        3              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@AriPerkkio AriPerkkio force-pushed the ari/fix-multi-browser-instance-setup branch from 0533fac to 47a4609 Compare May 5, 2026 08:22
@AriPerkkio AriPerkkio marked this pull request as ready for review May 5, 2026 08:53
@AriPerkkio AriPerkkio force-pushed the ari/fix-multi-browser-instance-setup branch from 47a4609 to b47ebcc Compare May 7, 2026 08:25
@AriPerkkio AriPerkkio force-pushed the ari/fix-multi-browser-instance-setup branch from b47ebcc to a625dc7 Compare May 7, 2026 09:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant