Skip to content

Commit

Permalink
test: dir class initialisation w/o handler
Browse files Browse the repository at this point in the history
Covering the case when init Dir class without passing
handle paramd to constructor.

PR-URL: #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>
  • Loading branch information
Dmitriy Kikinskiy authored and addaleax committed Nov 30, 2019
1 parent 329a821 commit d4b6170
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions test/parallel/test-fs-read.js
Expand Up @@ -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),
{
Expand Down

0 comments on commit d4b6170

Please sign in to comment.