Skip to content

Commit

Permalink
move mutateFS reset out of t.teardown
Browse files Browse the repository at this point in the history
Not sure why this was failing on my system, but this fixes it.
  • Loading branch information
isaacs committed May 12, 2023
1 parent 4aaffc8 commit 8cd8139
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion test/unpack.js
Expand Up @@ -514,7 +514,8 @@ t.test('symlink in dir path', {

t.test('clobber through symlink with busted unlink', t => {
const poop = new Error('poop')
t.teardown(mutateFS.fail('unlink', poop))
// for some reason, resetting fs.unlink in the teardown was breaking
const reset = mutateFS.fail('unlink', poop)
const warnings = []
const u = new Unpack({
cwd: dir,
Expand All @@ -523,6 +524,7 @@ t.test('symlink in dir path', {
})
u.on('close', _ => {
t.same(warnings, [['TAR_ENTRY_ERROR', 'poop', poop]])
reset()
t.end()
})
u.end(data)
Expand Down

0 comments on commit 8cd8139

Please sign in to comment.