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 <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Rich Trott <[email protected]>
Reviewed-By: Daniel Bevenius <[email protected]>
  • Loading branch information
ah-yu authored and MylesBorins committed Dec 12, 2017
1 parent 5c70cef commit 42a8f03
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 42a8f03

Please sign in to comment.