Skip to content

Commit 88c1831

Browse files
committed
test: tmpdir creation failures should fail tests
tmpdir creation only happens for tests that need it. So failure to refresh the temporary directory should result in a failed test. PR-URL: #1976 Reviewed-By: Rod Vagg <[email protected]> Reviewed-By: Jeremiah Senkpiel <[email protected]>
1 parent c4ec041 commit 88c1831

File tree

1 file changed

+2
-9
lines changed

1 file changed

+2
-9
lines changed

test/common.js

+2-9
Original file line numberDiff line numberDiff line change
@@ -52,15 +52,8 @@ function rmdirSync(p, originalEr) {
5252
}
5353

5454
exports.refreshTmpDir = function() {
55-
try {
56-
rimrafSync(exports.tmpDir);
57-
} catch (e) {
58-
}
59-
60-
try {
61-
fs.mkdirSync(exports.tmpDir);
62-
} catch (e) {
63-
}
55+
rimrafSync(exports.tmpDir);
56+
fs.mkdirSync(exports.tmpDir);
6457
};
6558

6659
if (process.env.TEST_THREAD_ID) {

0 commit comments

Comments
 (0)