From a3b3485b34d3299dcbbce30e2d5ae2266dda5dbb Mon Sep 17 00:00:00 2001 From: Jennifer Bland Date: Mon, 20 Aug 2018 21:22:33 -0400 Subject: [PATCH] test: add comment describing test-fs-mkdir PR-URL: https://github.com/nodejs/node/pull/22424 Reviewed-By: Richard Lau Reviewed-By: Rich Trott Reviewed-By: Gireesh Punathil Reviewed-By: Anna Henningsen Reviewed-By: James M Snell Reviewed-By: Ruben Bridgewater Reviewed-By: Trivikram Kamat Reviewed-By: Ben Coe Reviewed-By: Tiancheng "Timothy" Gu --- test/parallel/test-fs-mkdir.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/test/parallel/test-fs-mkdir.js b/test/parallel/test-fs-mkdir.js index 024fdced9c44ae..f5fecbe1572aaf 100644 --- a/test/parallel/test-fs-mkdir.js +++ b/test/parallel/test-fs-mkdir.js @@ -33,6 +33,7 @@ function nextdir() { return `test${++dirc}`; } +// mkdir creates directory using assigned path { const pathname = path.join(tmpdir.path, nextdir()); @@ -42,6 +43,7 @@ function nextdir() { })); } +// mkdir creates directory with assigned mode value { const pathname = path.join(tmpdir.path, nextdir()); @@ -51,6 +53,7 @@ function nextdir() { })); } +// mkdirSync successfully creates directory from given path { const pathname = path.join(tmpdir.path, nextdir()); @@ -60,6 +63,8 @@ function nextdir() { assert.strictEqual(exists, true); } +// mkdirSync and mkdir require path to be a string, buffer or url. +// Anything else generates an error. [false, 1, {}, [], null, undefined].forEach((i) => { common.expectsError( () => fs.mkdir(i, common.mustNotCall()),