From 88c1831ff4f7c636832b7c98333e326ed81a7080 Mon Sep 17 00:00:00 2001 From: Rich Trott Date: Sun, 14 Jun 2015 07:02:29 -0700 Subject: [PATCH] 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: https://github.com/nodejs/io.js/pull/1976 Reviewed-By: Rod Vagg Reviewed-By: Jeremiah Senkpiel --- test/common.js | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/test/common.js b/test/common.js index 704c64baf36f3c..1a56449917be9c 100644 --- a/test/common.js +++ b/test/common.js @@ -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) {