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 11, 2017
1 parent b6729df commit 256eaa9
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 @@ -24,13 +24,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 @@ -40,10 +33,6 @@ common.refreshTmpDir();
assert.strictEqual(err, null);
assert.strictEqual(common.fileExists(pathname), true);
}));

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

{
Expand All @@ -53,21 +42,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 256eaa9

Please sign in to comment.