From 42a8f03a8b2344bc69df2e1447fe4554581a8a9b Mon Sep 17 00:00:00 2001 From: buji Date: Mon, 20 Nov 2017 09:04:28 +0800 Subject: [PATCH] test: remove unlink function which is needless PR-URL: https://github.com/nodejs/node/pull/17119 Reviewed-By: Colin Ihrig Reviewed-By: James M Snell Reviewed-By: Rich Trott Reviewed-By: Daniel Bevenius --- test/parallel/test-fs-mkdir.js | 18 ------------------ 1 file changed, 18 deletions(-) diff --git a/test/parallel/test-fs-mkdir.js b/test/parallel/test-fs-mkdir.js index 21f8774e696aa7..54585a3f12a64b 100644 --- a/test/parallel/test-fs-mkdir.js +++ b/test/parallel/test-fs-mkdir.js @@ -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(); { @@ -40,10 +33,6 @@ common.refreshTmpDir(); assert.strictEqual(err, null); assert.strictEqual(common.fileExists(pathname), true); })); - - process.on('exit', function() { - unlink(pathname); - }); } { @@ -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); }