Skip to content

Commit

Permalink
test: remove unlink function which is needless
Browse files Browse the repository at this point in the history
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 Dec 19, 2017
1 parent 7c57ab7 commit 7cbdeef
Showing 1 changed file with 0 additions and 18 deletions.
18 changes: 0 additions & 18 deletions test/parallel/test-fs-mkdir.js
Original file line number Diff line number Diff line change
Expand Up @@ -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();

{
Expand All @@ -19,10 +12,6 @@ common.refreshTmpDir();
assert.strictEqual(err, null);
assert.strictEqual(common.fileExists(pathname), true);
}));

process.on('exit', function() {
unlink(pathname);
});
}

{
Expand All @@ -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);
}

Expand Down

0 comments on commit 7cbdeef

Please sign in to comment.