test: only show overridden env in child process failures · nodejs/node@ea71e96 · GitHub
Skip to content

Commit ea71e96

Browse files
joyeecheungaduh95
authored andcommitted
test: only show overridden env in child process failures
Previously when the child process helpers are used to print information about the failed expectations and the env of the child process was overridden, it printed the entire env object, which may be too much if the caller does something like { env: { ENV: 'var', ...process.env } } (which tend to be always the case for specifying env because we need to copy the process.env for dynamic library loading in the CI). This updates it to only show the env vars that differ from process.env for a cleaner log in the case of failure. PR-URL: #60556 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
1 parent 06b2e34 commit ea71e96

1 file changed

Lines changed: 16 additions & 2 deletions

File tree

test/common/child_process.js

Lines changed: 16 additions & 2 deletions

0 commit comments

Comments
 (0)