Skip to content

Commit

Permalink
test: tmpdir creation failures should fail tests
Browse files Browse the repository at this point in the history
tmpdir creation only happens for tests that need it. So failure to
refresh the temporary directory should result in a failed test.
  • Loading branch information
Trott committed Jun 17, 2015
1 parent c4ec041 commit c982bb1
Showing 1 changed file with 2 additions and 9 deletions.
11 changes: 2 additions & 9 deletions test/common.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,15 +52,8 @@ function rmdirSync(p, originalEr) {
}

exports.refreshTmpDir = function() {
try {
rimrafSync(exports.tmpDir);
} catch (e) {
}

try {
fs.mkdirSync(exports.tmpDir);
} catch (e) {
}
rimrafSync(exports.tmpDir);
fs.mkdirSync(exports.tmpDir);
};

if (process.env.TEST_THREAD_ID) {
Expand Down

0 comments on commit c982bb1

Please sign in to comment.