| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
|
Review requested:
|
Sorry, something went wrong.
|
Many of our tests that launch child processes only check the status of them without additional logging so when they fail, usually what you see from a assert.strictEqual(child.status, 0) is only: Uncaught AssertionError [ERR_ASSERTION]: Expected values to be strictly equal: 1 !== 0 and without changing the code to do additional logging it's usually impossible to understand exactly what's causing the failure. this is especially troublesome when debugging flaky tests in the CI. So my hope is that we can also gradually use these methods instead of doing assert.strictEqual(child.status, 0) right after launching child processes in the tests.... |
Sorry, something went wrong.
Sorry, something went wrong.
These can be used to check the state and the output of a child process launched with `spawnSync()`. They log additional information about the child process when the check fails to facilitate debugging test failures.
..and replace the similar code added for logging.
Sorry, something went wrong.
These can be used to check the state and the output of a child process launched with `spawnSync()`. They log additional information about the child process when the check fails to facilitate debugging test failures. PR-URL: #49020 Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
..and replace the similar code added for logging. PR-URL: #49020 Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
These can be used to check the state and the output of a child process launched with `spawnSync()`. They log additional information about the child process when the check fails to facilitate debugging test failures. PR-URL: #49020 Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
..and replace the similar code added for logging. PR-URL: #49020 Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
These can be used to check the state and the output of a child process launched with `spawnSync()`. They log additional information about the child process when the check fails to facilitate debugging test failures. PR-URL: #49020 Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
These can be used to check the state and the output of a child process launched with `spawnSync()`. They log additional information about the child process when the check fails to facilitate debugging test failures. PR-URL: nodejs/node#49020 Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
These can be used to check the state and the output of a child process launched with `spawnSync()`. They log additional information about the child process when the check fails to facilitate debugging test failures. PR-URL: nodejs/node#49020 Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
| Back | FazBrowse Home | New Git URL |
test: add expectSyncExitWithoutError() and expectSyncExit() utils
These can be used to check the state and the output of a child
process launched with spawnSync(). They log additional information
about the child process when the check fails to facilitate debugging
test failures.
test: use expectSyncExit{WithErrors} in snapshot tests
..and replace the similar code added for logging.