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); }