Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit edfa62a

Browse filesBrowse files
ah-yugibfahn
authored andcommitted
test: remove unlink function which is needless
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>
1 parent 3028fa7 commit edfa62a
Copy full SHA for edfa62a

File tree

Expand file treeCollapse file tree

1 file changed

+0
-18
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

1 file changed

+0
-18
lines changed
Open diff view settings
Collapse file

‎test/parallel/test-fs-mkdir.js‎

Copy file name to clipboardExpand all lines: test/parallel/test-fs-mkdir.js
-18Lines changed: 0 additions & 18 deletions
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 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.