diff options
Diffstat (limited to 'test/parallel/test-fs-mkdir.js')
-rw-r--r-- | test/parallel/test-fs-mkdir.js | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/test/parallel/test-fs-mkdir.js b/test/parallel/test-fs-mkdir.js index 2cd42f6566..5e9a2bd75e 100644 --- a/test/parallel/test-fs-mkdir.js +++ b/test/parallel/test-fs-mkdir.js @@ -217,13 +217,14 @@ if (common.isMainThread && (common.isLinux || common.isOSX)) { { const pathname = path.join(tmpdir.path, nextdir()); ['', 1, {}, [], null, Symbol('test'), () => {}].forEach((recursive) => { + const received = common.invalidArgTypeHelper(recursive); common.expectsError( () => fs.mkdir(pathname, { recursive }, common.mustNotCall()), { code: 'ERR_INVALID_ARG_TYPE', type: TypeError, - message: 'The "recursive" argument must be of type boolean. Received ' + - `type ${typeof recursive}` + message: 'The "recursive" argument must be of type boolean.' + + received } ); common.expectsError( @@ -231,8 +232,8 @@ if (common.isMainThread && (common.isLinux || common.isOSX)) { { code: 'ERR_INVALID_ARG_TYPE', type: TypeError, - message: 'The "recursive" argument must be of type boolean. Received ' + - `type ${typeof recursive}` + message: 'The "recursive" argument must be of type boolean.' + + received } ); }); |