Skip to content

Commit

Permalink
chore: fix resetting exit code in tests
Browse files Browse the repository at this point in the history
  • Loading branch information
lukekarrys committed Sep 14, 2023
1 parent 994a278 commit 339c780
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 3 additions & 1 deletion test/bin/apply.js
Expand Up @@ -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) => {
Expand Down
4 changes: 3 additions & 1 deletion test/bin/check.js
Expand Up @@ -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) => {
Expand Down

0 comments on commit 339c780

Please sign in to comment.