From 7cbdeefc7e3096c996a9a7b63945e1ce2fad72e2 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 93e14d47c75596..8268a39e18e9d7 100644 --- a/test/parallel/test-fs-mkdir.js +++ b/test/parallel/test-fs-mkdir.js @@ -3,13 +3,6 @@ const common = require('../common'); const assert = require('assert'); const fs = require('fs'); -function unlink(pathname) { - try { - fs.rmdirSync(pathname); - } catch (e) { - } -} - common.refreshTmpDir(); { @@ -19,10 +12,6 @@ common.refreshTmpDir(); assert.strictEqual(err, null); assert.strictEqual(common.fileExists(pathname), true); })); - - process.on('exit', function() { - unlink(pathname); - }); } { @@ -32,21 +21,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); }