Skip to content

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

Open
greenheadHQ wants to merge 1 commit into
nodejs:mainfrom
greenheadHQ:use-spawnsync-helpers
Open

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

Conversation

@greenheadHQ

@greenheadHQ greenheadHQ commented Aug 25, 2026

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>
@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

Review requested:

  • @nodejs/test_runner

@nodejs-github-bot 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

codecov Bot commented Aug 26, 2026

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

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.

3 participants