Skip to content

Commit 7cbdeef

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 7c57ab7 commit 7cbdeef

File tree

1 file changed

+0
-18
lines changed

1 file changed

+0
-18
lines changed

test/parallel/test-fs-mkdir.js

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,6 @@ const common = require('../common');
33
const assert = require('assert');
44
const fs = require('fs');
55

6-
function unlink(pathname) {
7-
try {
8-
fs.rmdirSync(pathname);
9-
} catch (e) {
10-
}
11-
}
12-
136
common.refreshTmpDir();
147

158
{
@@ -19,10 +12,6 @@ common.refreshTmpDir();
1912
assert.strictEqual(err, null);
2013
assert.strictEqual(common.fileExists(pathname), true);
2114
}));
22-
23-
process.on('exit', function() {
24-
unlink(pathname);
25-
});
2615
}
2716

2817
{
@@ -32,21 +21,14 @@ common.refreshTmpDir();
3221
assert.strictEqual(err, null);
3322
assert.strictEqual(common.fileExists(pathname), true);
3423
}));
35-
36-
process.on('exit', function() {
37-
unlink(pathname);
38-
});
3924
}
4025

4126
{
4227
const pathname = `${common.tmpDir}/test3`;
4328

44-
unlink(pathname);
4529
fs.mkdirSync(pathname);
4630

4731
const exists = common.fileExists(pathname);
48-
unlink(pathname);
49-
5032
assert.strictEqual(exists, true);
5133
}
5234

0 commit comments

Comments
 (0)