Skip to content

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

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

test: use common spawnSync helpers in more tests#65552
greenheadHQ wants to merge 3 commits 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

@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 (fe6a4cd) to head (d43187e).
⚠️ Report is 10 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #65552      +/-   ##
==========================================
- Coverage   90.08%   90.07%   -0.01%     
==========================================
  Files         751      751              
  Lines      254865   254875      +10     
  Branches    48114    48120       +6     
==========================================
- Hits       229586   229582       -4     
- Misses      16467    16496      +29     
+ Partials     8812     8797      -15     

see 39 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 atlowChemi added the request-ci Add this label to start a Jenkins CI on a PR. label Aug 26, 2026
@github-actions github-actions Bot removed the request-ci Add this label to start a Jenkins CI on a PR. label Aug 26, 2026
@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

Comment thread test/message/node_run_list.js
Comment thread test/parallel/test-runner-coverage-default-exclusion.mjs Outdated
Comment thread test/parallel/test-runner-coverage-default-exclusion.mjs Outdated
Comment thread test/parallel/test-runner-coverage-default-exclusion.mjs Outdated
@aduh95 aduh95 closed this Aug 26, 2026
@aduh95 aduh95 reopened this Aug 26, 2026
@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

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>
Signed-off-by: greenhead <greenheadhq@gmail.com>
Signed-off-by: greenhead <greenheadhq@gmail.com>
@greenheadHQ
greenheadHQ force-pushed the use-spawnsync-helpers branch from 40307b2 to d43187e Compare August 27, 2026 11:48
@greenheadHQ

greenheadHQ commented Aug 27, 2026

Copy link
Copy Markdown
Contributor Author

Rebased onto main. #64003 added a new spawnSync call site in test-fs-glob.mjs, which broke CI here since this PR removes that import, so it now uses the helper too.

@aduh95 aduh95 added author ready PRs that have at least one approval, no outstanding review comments, and a CI started. request-ci Add this label to start a Jenkins CI on a PR. labels Aug 27, 2026
@github-actions github-actions Bot removed the request-ci Add this label to start a Jenkins CI on a PR. label Aug 27, 2026
@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

author ready PRs that have at least one approval, no outstanding review comments, and a CI started. 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.

6 participants