From fee2a0d170f04bc2e6fed0d433b9cf6eba90229e Mon Sep 17 00:00:00 2001 From: Jennifer Bland Date: Mon, 20 Aug 2018 21:22:33 -0400 Subject: [PATCH 1/2] test: add comments describing every test --- test/parallel/test-fs-mkdir.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/test/parallel/test-fs-mkdir.js b/test/parallel/test-fs-mkdir.js index 024fdced9c44ae..e4d490dfb03ebb 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,7 @@ 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()), From 155b05318111434bceac4d4e30e519c9c66a1551 Mon Sep 17 00:00:00 2001 From: Jennifer Bland Date: Mon, 20 Aug 2018 21:56:48 -0400 Subject: [PATCH 2/2] Fixed lint issue where line was over 80 character limit --- test/parallel/test-fs-mkdir.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/test/parallel/test-fs-mkdir.js b/test/parallel/test-fs-mkdir.js index e4d490dfb03ebb..c30ff524d4a08d 100644 --- a/test/parallel/test-fs-mkdir.js +++ b/test/parallel/test-fs-mkdir.js @@ -63,7 +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 +// 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()),