test: add test for 'ERR_INVALID_CALLBACK'
PR-URL: https://github.com/nodejs/node/pull/24224 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
This commit is contained in:
parent
b88195716f
commit
f8c3e258fd
@ -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(),
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user