-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Labels
feat: browserIssues and PRs related to the browser runnerIssues and PRs related to the browser runnerp3-minor-bugAn edge case that only affects very specific usage (priority)An edge case that only affects very specific usage (priority)
Description
Clear and concise description of the problem
I'm seeing flakiness with Firefox when running test files parallel. Turning off fileParallelism seems to work.
I have chromium in browser.instances too, that is able to run all files parallel quick and stable. Setting top-level fileParallelism: false is not ideal.
Suggested solution
import { defineConfig } from 'vitest/config';
export default defineConfig({
test: {
browser: {
enabled: true,
provider: 'playwright',
instances: [
// Run all tests parallel with Chromium, it's stable
{ browser: "chromium" }, // resolves to default fileParallelism: true
// Firefox is flaky, run tests without parallelism
{ browser: "firefox", fileParallelism: false },
],
},
},
});Alternative
Right now I'm using following script:
"scripts": {
"test": "vitest --project chromium && vitest --project firefox --no-file-parallelism"
}Additional context
No response
Validations
- Follow our Code of Conduct
- Read the Contributing Guidelines.
- Read the docs.
- Check that there isn't already an issue that request the same feature to avoid creating a duplicate.
huntabyte and pan-alexey
Metadata
Metadata
Assignees
Labels
feat: browserIssues and PRs related to the browser runnerIssues and PRs related to the browser runnerp3-minor-bugAn edge case that only affects very specific usage (priority)An edge case that only affects very specific usage (priority)
Type
Projects
Status
Approved