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: nodejs#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 gireeshpunathil committed Nov 10, 2018
1 parent b881957 commit f8c3e25
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 f8c3e25

Please sign in to comment.