Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test: add spawnSyncAndAssert util #52132

Merged
merged 2 commits into from
Mar 20, 2024

Conversation

aduh95
Copy link
Contributor

@aduh95 aduh95 commented Mar 18, 2024

spawnSyncAndExitWithoutError will use the last argument as a bag of expectations, but will also pass it to spawnSync. That sometimes causes problems if the expectations are incompatible with the bag of options spawnSync expects. With this PR, all arguments but the last one is passed to spawnSync, making for a more comprehensible API.

@aduh95 aduh95 requested a review from joyeecheung March 18, 2024 08:57
@nodejs-github-bot
Copy link
Collaborator

Review requested:

  • @nodejs/single-executable
  • @nodejs/startup

@nodejs-github-bot nodejs-github-bot added needs-ci PRs that need a full CI run. test Issues and PRs related to the tests. labels Mar 18, 2024
test/common/child_process.js Outdated Show resolved Hide resolved
@aduh95 aduh95 force-pushed the spawnSyncAndExitWithoutError branch from dbd8884 to a83410d Compare March 18, 2024 21:36
@aduh95 aduh95 changed the title test: fix spawnSyncAndExitWithoutError test: add spawnSyncAndExitWithoutErrorAndAssert util Mar 18, 2024
@aduh95 aduh95 added author ready PRs that have at least one approval, no pending requests for changes, and a CI started. request-ci Add this label to start a Jenkins CI on a PR. labels Mar 20, 2024
@github-actions github-actions bot removed the request-ci Add this label to start a Jenkins CI on a PR. label Mar 20, 2024
@nodejs-github-bot
Copy link
Collaborator

@aduh95 aduh95 requested a review from MoLow March 20, 2024 12:19
@joyeecheung
Copy link
Member

The length of the name seems to get out of hands a bit...can this just be spawnSyncAndAssert?

@aduh95 aduh95 force-pushed the spawnSyncAndExitWithoutError branch from a83410d to 74abb83 Compare March 20, 2024 14:28
@aduh95 aduh95 added the request-ci Add this label to start a Jenkins CI on a PR. label Mar 20, 2024
@aduh95 aduh95 changed the title test: add spawnSyncAndExitWithoutErrorAndAssert util test: add spawnSyncAndAssert util Mar 20, 2024
@aduh95 aduh95 removed the request-ci Add this label to start a Jenkins CI on a PR. label Mar 20, 2024
@aduh95 aduh95 force-pushed the spawnSyncAndExitWithoutError branch from 74abb83 to 9dfd601 Compare March 20, 2024 14:36
test/common/child_process.js Outdated Show resolved Hide resolved
@aduh95 aduh95 added the request-ci Add this label to start a Jenkins CI on a PR. label Mar 20, 2024
@github-actions github-actions bot removed the request-ci Add this label to start a Jenkins CI on a PR. label Mar 20, 2024
@nodejs-github-bot
Copy link
Collaborator

@nodejs-github-bot
Copy link
Collaborator

@aduh95 aduh95 merged commit c714cda into nodejs:main Mar 20, 2024
52 checks passed
@aduh95
Copy link
Contributor Author

aduh95 commented Mar 20, 2024

Landed in c714cda

@aduh95 aduh95 deleted the spawnSyncAndExitWithoutError branch March 20, 2024 18:44
rdw-msft pushed a commit to rdw-msft/node that referenced this pull request Mar 26, 2024
PR-URL: nodejs#52132
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
marco-ippolito pushed a commit that referenced this pull request May 2, 2024
PR-URL: #52132
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
marco-ippolito pushed a commit that referenced this pull request May 3, 2024
PR-URL: #52132
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
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 pending requests for changes, and a CI started. needs-ci PRs that need a full CI run. test Issues and PRs related to the tests.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants