Skip to content

fix(runner): Ensure inner suite { sequential: true } correctly overrides outer suite { concurrent: true } #5737

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

Merged

Conversation

pengooseDev
Copy link
Contributor

Description

Fixes issue #5716

This PR addresses an issue where an inner suite with { sequential: true } does not correctly override an outer suite with { concurrent: true }. Previously, the inheritance logic for options.concurrent and options.sequential led to unexpected behavior where conflicting options were not handled properly. This fix ensures that inner suites with { sequential: true } override outer suites with { concurrent: true }, providing the expected behavior for nested suite configurations.

  • Adjust the logic in createSuiteCollector to properly handle conflicting concurrent and sequential options.
  • Ensure that options.concurrent and options.sequential are inherited with clear default values, preventing undefined values.
  • Update the task context to accurately reflect the intended concurrency behavior.

Please don't delete this checklist! Before submitting the PR, please make sure you do the following:

  • It's really useful if your PR references an issue where it is discussed ahead of time. If the feature is substantial or introduces breaking changes without a discussion, PR might be closed.
  • Ideally, include a test that fails without this PR but passes with it.
  • Please, don't make changes to pnpm-lock.yaml unless you introduce a new test example.

Tests

  • Run the tests with pnpm test:ci.

Documentation

  • If you introduce new functionality, document it. You can run documentation with pnpm run docs command.

Changesets

  • Changes in changelog are generated from PR name. Please, make sure that it explains your changes in an understandable manner. Please, prefix changeset messages with feat:, fix:, perf:, docs:, or chore:.

@pengooseDev pengooseDev force-pushed the fix-override-sequential-config branch from 2632e50 to a77ca41 Compare May 16, 2024 18:16
@pengooseDev pengooseDev force-pushed the fix-override-sequential-config branch from a77ca41 to 1734957 Compare May 17, 2024 06:20
@sheremet-va sheremet-va merged commit a20e75b into vitest-dev:main May 17, 2024
16 checks passed
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.

inner suite { sequential: true } doesn't override outer suite { concurrent: true }
2 participants