Skip to content

Commit d7d4fe1

Browse files
darkytargos
authored andcommitted
fs: cover fs.opendir ERR_INVALID_CALLBACK
PR-URL: #30307 Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Trivikram Kamat <[email protected]> Reviewed-By: Ruben Bridgewater <[email protected]> Reviewed-By: Сковорода Никита Андреевич <[email protected]> Reviewed-By: Gireesh Punathil <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: James M Snell <[email protected]>
1 parent 447c7a1 commit d7d4fe1

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

test/parallel/test-fs-opendir.js

+4
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,10 @@ assert.throws(function() {
8686
fs.opendirSync(__filename);
8787
}, /Error: ENOTDIR: not a directory/);
8888

89+
assert.throws(function() {
90+
fs.opendir(__filename);
91+
}, /TypeError \[ERR_INVALID_CALLBACK\]: Callback must be a function/);
92+
8993
fs.opendir(__filename, common.mustCall(function(e) {
9094
assert.strictEqual(e.code, 'ENOTDIR');
9195
}));

0 commit comments

Comments
 (0)