FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

test: use common spawnSync helpers in more tests by greenheadHQ · Pull Request #65552 · nodejs/node · GitHub

/ node Public

test: use common spawnSync helpers in more tests - #65552

Open
greenheadHQ wants to merge 2 commits into
nodejs:mainfrom
greenheadHQ:use-spawnsync-helpers
Open

test: use common spawnSync helpers in more tests#65552
greenheadHQ wants to merge 2 commits into
nodejs:mainfrom
greenheadHQ:use-spawnsync-helpers

Conversation

greenheadHQ commented Aug 25, 2026
edited
Loading

Copy link
Copy Markdown
Contributor

Replaces manual spawnSync() result assertions with the test/common/child_process helpers in eight tests, following the same approach as #65377. Every existing expectation (status, signal, stream contents) is preserved, and the helpers report the command and both streams when a check fails.

This also adds a signal check at call sites that previously only compared status, matching the helper defaults.

Only success-path blocks whose assertions map one-to-one onto the helper defaults are converted. blocks that assert bespoke failure modes are left unchanged.

Refs: #65377

The helpers report the command, both streams, and the exit condition
on failure, so mismatches are diagnosed consistently across tests.

Signed-off-by: greenhead <greenheadhq@gmail.com>

Copy link
Copy Markdown
Collaborator

Review requested:

  • @nodejs/test_runner

nodejs-github-bot added needs-ci PRs that need a full CI run. test Issues and PRs related to the tests. tty Issues and PRs related to the tty subsystem. labels Aug 25, 2026

codecov Bot commented Aug 26, 2026
edited
Loading

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 90.07%. Comparing base (54b4e37) to head (c2fde19).
⚠️ Report is 12 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #65552      +/-   ##
==========================================
- Coverage   90.13%   90.07%   -0.06%     
==========================================
  Files         751      751              
  Lines      253635   254075     +440     
  Branches    47786    47902     +116     
==========================================
+ Hits       228615   228862     +247     
- Misses      16268    16420     +152     
- Partials     8752     8793      +41     

see 41 files with indirect coverage changes

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

atlowChemi added the request-ci Add this label to start a Jenkins CI on a PR. label Aug 26, 2026
github-actions Bot removed the request-ci Add this label to start a Jenkins CI on a PR. label Aug 26, 2026

Copy link
Copy Markdown
Collaborator

{ status: 9, signal: null },
);
assert.strictEqual(child.status, 9);
console.log(child.stderr);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

nit: this is no longer necessary, the helper will output it in case of error

Suggested change
console.log(child.stderr);

greenheadHQ Aug 26, 2026
edited
Loading

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

@aduh95 Thanks for the review!

I tried this locally and the test fails. This is a message test, so this console.log is what produces the output matched against node_run_list.out. The helper only prints on mismatch, and { status: 9, signal: null } is the expected result here.

Happy to update if I'm missing something!

Signed-off-by: greenhead <greenheadhq@gmail.com>
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

Labels

needs-ci PRs that need a full CI run. test Issues and PRs related to the tests. tty Issues and PRs related to the tty subsystem.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants


Back | FazBrowse Home | New Git URL