Skip to content

Commit

Permalink
test: add test for 'ERR_INVALID_CALLBACK'
Browse files Browse the repository at this point in the history
PR-URL: #24224
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Gireesh Punathil <[email protected]>
Reviewed-By: Ruben Bridgewater <[email protected]>
  • Loading branch information
razvanbh authored and MylesBorins committed Dec 26, 2018
1 parent 540b741 commit 2d6e942
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions test/sequential/test-inspector-module.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,17 @@ session.post('Runtime.evaluate', { expression: '2 + 2' });
);
});

[1, 'a', {}, [], true, Infinity].forEach((i) => {
common.expectsError(
() => session.post('test', {}, i),
{
code: 'ERR_INVALID_CALLBACK',
type: TypeError,
message: 'Callback must be a function'
}
);
});

common.expectsError(
() => session.connect(),
{
Expand Down

0 comments on commit 2d6e942

Please sign in to comment.