Skip to content

Commit

Permalink
Ensure cleanup executes for pack-scoped test.
Browse files Browse the repository at this point in the history
Test failure was leaving an assortment of files dangling around:

  test/tap/scoped_package/cache/@scope/generic-package/90000.100001.5/package.tgz
  test/tap/scoped_package/cache/@scope/generic-package/90000.100001.5/package/package.json
  test/tap/scoped_package/package.json
  test/tap/scoped_package/scope-generic-package-90000.100001.5.tgz
  • Loading branch information
timoxley authored and othiym23 committed Sep 23, 2014
1 parent 69b4d18 commit ef9101b
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions test/tap/pack-scoped.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ test("setup", function (t) {
function then () {
n++
return function (er) {
if (er) throw er
t.ifError(er)
if (--n === 0) next()
}
}
Expand All @@ -36,7 +36,7 @@ test("setup", function (t) {
}

function done (er) {
if (er) throw er
t.ifError(er)

t.pass("setup done")
t.end()
Expand Down Expand Up @@ -71,7 +71,7 @@ test("test", function (t) {

function onend () {
if (e) {
throw new Error("got stderr data: " + JSON.stringify("" + e))
t.fail("got stderr data: " + JSON.stringify("" + e))
}
c = c.trim()
var regex = new RegExp("scope-generic-package-90000.100001.5.tgz", "ig")
Expand All @@ -83,7 +83,7 @@ test("test", function (t) {

test("cleanup", function (t) {
rimraf(pkg, function (er) {
if (er) throw er
t.ifError(er)

t.pass("cleaned up")
t.end()
Expand Down

0 comments on commit ef9101b

Please sign in to comment.