diff --git a/test/bin/apply.js b/test/bin/apply.js index ab4d2981..9c80e2f9 100644 --- a/test/bin/apply.js +++ b/test/bin/apply.js @@ -22,7 +22,9 @@ t.afterEach(() => { process.env.npm_config_global = _global process.env.npm_config_local_prefix = _prefix global.console = _console - delete process.exitCode + if (process.exitCode) { + process.exitCode = 0 + } }) t.test('when npm_config_local_prefix is unset, does nothing', async (t) => { diff --git a/test/bin/check.js b/test/bin/check.js index 12aba611..40b3704b 100644 --- a/test/bin/check.js +++ b/test/bin/check.js @@ -20,7 +20,9 @@ t.afterEach(() => { process.env.npm_config_local_prefix = _prefix errors.length = 0 global.console = _console - delete process.exitCode + if (process.exitCode) { + process.exitCode = 0 + } }) t.test('no local prefix', async (t) => {