Skip to content

fix: global sequence.concurrent: true with top-level test(..., { concurrent: false }) + depreacte sequential test API and options#10194

Merged
sheremet-va merged 13 commits intovitest-dev:mainfrom
hi-ogawa:refactor-runner-depreacte-sequential
Apr 25, 2026
Merged

fix: global sequence.concurrent: true with top-level test(..., { concurrent: false }) + depreacte sequential test API and options#10194
sheremet-va merged 13 commits intovitest-dev:mainfrom
hi-ogawa:refactor-runner-depreacte-sequential

Conversation

@hi-ogawa
Copy link
Copy Markdown
Collaborator

@hi-ogawa hi-ogawa commented Apr 25, 2026

Description

I added TypedChainableFunction so that the same jsdoc get surfaced as test.sequential and test("...", { sequential }). This allows showing deprecated on IDE such as:

image

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.
  • Please check Allow edits by maintainers to make review process faster. Note that this option is not available for repositories that are owned by Github organizations.

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:.

@netlify
Copy link
Copy Markdown

netlify Bot commented Apr 25, 2026

Deploy Preview for vitest-dev ready!

Built without sensitive environment variables

Name Link
🔨 Latest commit 2b6b3e3
🔍 Latest deploy log https://app.netlify.com/projects/vitest-dev/deploys/69ec8522815ae80008a31af3
😎 Deploy Preview https://deploy-preview-10194--vitest-dev.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@hi-ogawa hi-ogawa changed the title refactor(runner): depreacte sequential refactor(runner): depreacte sequential test API and options Apr 25, 2026
@hi-ogawa hi-ogawa changed the title refactor(runner): depreacte sequential test API and options fix: global sequence.concurrent: true with test(..., { concurrent: false}) + depreacte sequential test API and options Apr 25, 2026
@hi-ogawa hi-ogawa changed the title fix: global sequence.concurrent: true with test(..., { concurrent: false}) + depreacte sequential test API and options fix: global sequence.concurrent: true with test(..., { concurrent: false }) + depreacte sequential test API and options Apr 25, 2026
Comment thread packages/runner/src/suite.ts Outdated
if (
options.concurrent
|| (!options.sequential && runner.config.sequence.concurrent)
?? (!options.sequential && runner.config.sequence.concurrent)
Copy link
Copy Markdown
Collaborator Author

@hi-ogawa hi-ogawa Apr 25, 2026

Choose a reason for hiding this comment

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

The explicit { concurrent: false } wasn't overriding global sequence.concurrent: true.

This was only for top-level test since describe already does this

// inherit concurrent / sequential from suite
const concurrent = this.concurrent ?? (!this.sequential && options?.concurrent)
if (options.concurrent != null && concurrent != null) {
options.concurrent = concurrent
}

@hi-ogawa hi-ogawa changed the title fix: global sequence.concurrent: true with test(..., { concurrent: false }) + depreacte sequential test API and options fix: global sequence.concurrent: true with top-level test(..., { concurrent: false }) + depreacte sequential test API and options Apr 25, 2026
@hi-ogawa hi-ogawa marked this pull request as ready for review April 25, 2026 08:05
sheremet-va
sheremet-va previously approved these changes Apr 25, 2026
Copy link
Copy Markdown
Member

@sheremet-va sheremet-va left a comment

Choose a reason for hiding this comment

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

LGTM, will you backport after the merge?

Comment thread docs/api/describe.md Outdated
Comment thread docs/api/test.md Outdated
Co-authored-by: Vladimir <sleuths.slews0s@icloud.com>
@hi-ogawa
Copy link
Copy Markdown
Collaborator Author

Will cherry-pick after merged.

@hi-ogawa hi-ogawa requested a review from sheremet-va April 25, 2026 10:23
@sheremet-va sheremet-va merged commit 9387f57 into vitest-dev:main Apr 25, 2026
16 checks passed
@hi-ogawa hi-ogawa deleted the refactor-runner-depreacte-sequential branch April 25, 2026 12:28
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.

2 participants