test: add and use expectSyncExitWithoutError() and expectSyncExit() utils
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.