Repository navigation
test(node-integration): Replace conditionalTest with a supports helper - #25202
Merged
Merged
Conversation
JPeer264
added this pull request to stack #25205
October 9, 2026 06:50
Member
Author
|
bugbot run |
There was a problem hiding this comment.
✅ Bugbot reviewed your changes and found no new issues!
Comment @cursor review or bugbot run to trigger another review on this PR
Reviewed by Cursor Bugbot for commit 0ef01b6. Configure here.
JPeer264
marked this pull request as ready for review
October 9, 2026 07:10
JPeer264
requested review from
andreiborza and
isaacs
and removed request for
a team
October 9, 2026 07:10
…elper `supports(requirements)` returns whether the Node version and the runtime that runs the scenarios meet the requirements of the tests, for use in `test.runIf` and `describe.runIf`. It replaces `conditionalTest` and the `RUNTIME` checks in `skipIf`. `skipRuntimes` becomes `runtimes`, the runtimes that run the tests. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
JPeer264
force-pushed
the
jp/node-integration-tests-skip-helper
branch
from
October 12, 2026 11:19
0ef01b6 to
146254e
Compare
andreiborza
approved these changes
Oct 12, 2026
andreiborza
left a comment
Member
There was a problem hiding this comment.
Could we also add a bugbot review rule or a linting rule to use support over the older stuff?
Member
Author
|
@andreiborza good idea, will do in a follow up 👍 |
JPeer264
added a commit
that referenced
this pull request
Oct 12, 2026
…rom the test utils (#25292) follow up to #25202 This stops exporting `NODE_VERSION` and `RUNTIME` from the Node integration test utils, so suites limit tests with `test.runIf(supports({ ... }))`. It moves `thread-blocked-native`, the last suite that checked `NODE_VERSION` itself, to `supports`, and adds a Bugbot rule that flags suites that check the Node version or the runtime in other ways, for example with `process.versions`. Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
47 tasks done
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This replaces
conditionalTestwith asupports(requirements)helper that returns a boolean, so blocks and single tests use the same requirements with Vitest'srunIf. TheRUNTIMEchecks inskipIfuse it too, andskipRuntimesbecomesruntimes, the runtimes that run the tests.Most of the diff is new indentation. Hide whitespace to review.
Why
Blocks used
conditionalTest(options)and single tests usedskipIfwith aRUNTIMEcheck, so one condition had two forms. With one helper, a new requirement, for example a minimum Bun version, works for both.API decisions
The helper goes with
runIf, notskipIf, so each requirement says where the tests run, and a call does not read asskipIf(shouldSkip({ skipRuntimes })).runIfcannot take the requirements object directly, because Vitest only checks if the value is truthy. Wrapping Vitest'stestanddescribewould allow it, but then an object passed to Vitest's own functions would always run.