Skip to content

Commit 8cd8139

Browse files
committed
move mutateFS reset out of t.teardown
Not sure why this was failing on my system, but this fixes it.
1 parent 4aaffc8 commit 8cd8139

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

test/unpack.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -514,7 +514,8 @@ t.test('symlink in dir path', {
514514

515515
t.test('clobber through symlink with busted unlink', t => {
516516
const poop = new Error('poop')
517-
t.teardown(mutateFS.fail('unlink', poop))
517+
// for some reason, resetting fs.unlink in the teardown was breaking
518+
const reset = mutateFS.fail('unlink', poop)
518519
const warnings = []
519520
const u = new Unpack({
520521
cwd: dir,
@@ -523,6 +524,7 @@ t.test('symlink in dir path', {
523524
})
524525
u.on('close', _ => {
525526
t.same(warnings, [['TAR_ENTRY_ERROR', 'poop', poop]])
527+
reset()
526528
t.end()
527529
})
528530
u.end(data)

0 commit comments

Comments
 (0)