Permalink
Browse files

test: remove unlink function which is needless

PR-URL: #17119
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com>
  • Loading branch information...
ah-yu authored and MylesBorins committed Nov 20, 2017
1 parent 7c57ab7 commit 7cbdeefc7e3096c996a9a7b63945e1ce2fad72e2
Showing with 0 additions and 18 deletions.
  1. +0 −18 test/parallel/test-fs-mkdir.js
@@ -3,13 +3,6 @@ const common = require('../common');
const assert = require('assert');
const fs = require('fs');
function unlink(pathname) {
try {
fs.rmdirSync(pathname);
} catch (e) {
}
}
common.refreshTmpDir();
{
@@ -19,10 +12,6 @@ common.refreshTmpDir();
assert.strictEqual(err, null);
assert.strictEqual(common.fileExists(pathname), true);
}));
process.on('exit', function() {
unlink(pathname);
});
}
{
@@ -32,21 +21,14 @@ common.refreshTmpDir();
assert.strictEqual(err, null);
assert.strictEqual(common.fileExists(pathname), true);
}));
process.on('exit', function() {
unlink(pathname);
});
}
{
const pathname = `${common.tmpDir}/test3`;
unlink(pathname);
fs.mkdirSync(pathname);
const exists = common.fileExists(pathname);
unlink(pathname);
assert.strictEqual(exists, true);
}

0 comments on commit 7cbdeef

Please sign in to comment.