Skip to content

Commit

Permalink
Merge pull request #225 from raszi/gh-211
Browse files Browse the repository at this point in the history
fix #211: existing tests must clean up after themselves
  • Loading branch information
silkentrance authored Jan 27, 2020
2 parents 3ffd509 + 6de7196 commit ec35e59
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 8 deletions.
8 changes: 4 additions & 4 deletions test/dir-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ describe('tmp', function () {
try {
assertions.assertDoesNotExist(stdout);
} catch (err) {
rimraf.sync(stdout);
//rimraf.sync(stdout);
return done(err);
}
done();
Expand All @@ -76,8 +76,8 @@ describe('tmp', function () {
if (!stderr) return done(new Error('stderr expected'));
try {
assertions.assertExists(stdout);
} catch (err) {
rimraf.sync(stdout);
} catch (err) {
return done(err);
}
done();
Expand All @@ -90,8 +90,8 @@ describe('tmp', function () {
if (stderr) return done(new Error(stderr));
try {
assertions.assertExists(stdout);
} catch (err) {
rimraf.sync(stdout);
} catch (err) {
return done(err);
}
done();
Expand Down Expand Up @@ -137,8 +137,8 @@ describe('tmp', function () {
assertions.assertExists(path.join(stdout, 'symlinkme-target'), true);
else
assertions.assertExists(path.join(stdout, 'symlinkme-target'));
} catch (err) {
rimraf.sync(stdout);
} catch (err) {
return done(err);
}
done();
Expand Down
7 changes: 3 additions & 4 deletions test/file-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,8 @@ describe('tmp', function () {
if (!stderr) return done(new Error('stderr expected'));
try {
assertions.assertExists(stdout, true);
} catch (err) {
rimraf.sync(stdout);
} catch (err) {
return done(err);
}
done();
Expand All @@ -100,8 +100,8 @@ describe('tmp', function () {
if (stderr) return done(new Error(stderr));
try {
assertions.assertExists(stdout, true);
} catch (err) {
rimraf.sync(stdout);
} catch (err) {
return done(err);
}
done();
Expand Down Expand Up @@ -139,5 +139,4 @@ describe('tmp', function () {
});
});
});
});

});

0 comments on commit ec35e59

Please sign in to comment.