summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDmitriy Kikinskiy <di9@ytka.org>2019-11-06 17:16:17 +0300
committerGireesh Punathil <gpunathi@in.ibm.com>2019-11-26 20:27:16 +0530
commit8c41b19619d1241543047ceee85931647257c5cc (patch)
tree7dcc4a716a569e5bae929f1bab7a0c3599e022f8
parent4506991aafa59f311024a7290b5195cf030cee7c (diff)
downloadandroid-node-v8-8c41b19619d1241543047ceee85931647257c5cc.tar.gz
android-node-v8-8c41b19619d1241543047ceee85931647257c5cc.tar.bz2
android-node-v8-8c41b19619d1241543047ceee85931647257c5cc.zip
test: dir class initialisation w/o handler
Covering the case when init Dir class without passing handle paramd to constructor. PR-URL: https://github.com/nodejs/node/pull/30313 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: David Carlier <devnexen@gmail.com> Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
-rw-r--r--test/parallel/test-fs-read.js4
1 files changed, 4 insertions, 0 deletions
diff --git a/test/parallel/test-fs-read.js b/test/parallel/test-fs-read.js
index 9d9cf0db3a..e6fe6231ff 100644
--- a/test/parallel/test-fs-read.js
+++ b/test/parallel/test-fs-read.js
@@ -68,6 +68,10 @@ test(new Uint8Array(expected.length),
}));
}
+assert.throws(() => new fs.Dir(), {
+ code: 'ERR_MISSING_ARGS',
+});
+
assert.throws(
() => fs.read(fd, Buffer.alloc(1), 0, 1, 0),
{