test: dont need to remove nonexistent directory

the TempDirection is empty , so tempdir/test1 and tempdir/test2
are nonexistent. we dont need to delete nonexistent directories.

PR-URL: https://github.com/nodejs/node/pull/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>
This commit is contained in:
buji authored and Myles Borins committed 2017-12-12 03:27:18 -05:00
1 parent 7ebaf83602
commit 5c70cef403
1 file changed
-4
-4
View File
@@ -36,8 +36,6 @@ common.refreshTmpDir();
{
const pathname = `${common.tmpDir}/test1`;
unlink(pathname);
fs.mkdir(pathname, common.mustCall(function(err) {
assert.strictEqual(err, null);
assert.strictEqual(common.fileExists(pathname), true);
@@ -51,8 +49,6 @@ common.refreshTmpDir();
{
const pathname = `${common.tmpDir}/test2`;
unlink(pathname);
fs.mkdir(pathname, 0o777, common.mustCall(function(err) {
assert.strictEqual(err, null);
assert.strictEqual(common.fileExists(pathname), true);