Skip to content

Commit 42a8f03

Browse files
ah-yuMylesBorins
authored andcommitted
test: remove unlink function which is needless
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]>
1 parent 5c70cef commit 42a8f03

File tree

1 file changed

+0
-18
lines changed

1 file changed

+0
-18
lines changed

test/parallel/test-fs-mkdir.js

-18
Original file line numberDiff line numberDiff line change
@@ -24,13 +24,6 @@ const common = require('../common');
2424
const assert = require('assert');
2525
const fs = require('fs');
2626

27-
function unlink(pathname) {
28-
try {
29-
fs.rmdirSync(pathname);
30-
} catch (e) {
31-
}
32-
}
33-
3427
common.refreshTmpDir();
3528

3629
{
@@ -40,10 +33,6 @@ common.refreshTmpDir();
4033
assert.strictEqual(err, null);
4134
assert.strictEqual(common.fileExists(pathname), true);
4235
}));
43-
44-
process.on('exit', function() {
45-
unlink(pathname);
46-
});
4736
}
4837

4938
{
@@ -53,21 +42,14 @@ common.refreshTmpDir();
5342
assert.strictEqual(err, null);
5443
assert.strictEqual(common.fileExists(pathname), true);
5544
}));
56-
57-
process.on('exit', function() {
58-
unlink(pathname);
59-
});
6045
}
6146

6247
{
6348
const pathname = `${common.tmpDir}/test3`;
6449

65-
unlink(pathname);
6650
fs.mkdirSync(pathname);
6751

6852
const exists = common.fileExists(pathname);
69-
unlink(pathname);
70-
7153
assert.strictEqual(exists, true);
7254
}
7355

0 commit comments

Comments
 (0)