Skip to content

Commit 4a69d21

Browse files
razvanbhBridgeAR
authored andcommitted
test: add test for 'ERR_INVALID_CALLBACK'
PR-URL: #24224 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
1 parent 8b0626c commit 4a69d21

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

test/sequential/test-inspector-module.js

+11
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,17 @@ session.post('Runtime.evaluate', { expression: '2 + 2' });
4646
);
4747
});
4848

49+
[1, 'a', {}, [], true, Infinity].forEach((i) => {
50+
common.expectsError(
51+
() => session.post('test', {}, i),
52+
{
53+
code: 'ERR_INVALID_CALLBACK',
54+
type: TypeError,
55+
message: 'Callback must be a function'
56+
}
57+
);
58+
});
59+
4960
common.expectsError(
5061
() => session.connect(),
5162
{

0 commit comments

Comments
 (0)