summaryrefslogtreecommitdiff
path: root/test/sequential
diff options
context:
space:
mode:
authorrazvanbh <razvy.rotaru@gmail.com>2018-11-07 13:08:27 +0200
committerGireesh Punathil <gpunathi@in.ibm.com>2018-11-10 14:01:03 +0530
commitf8c3e258fdaf2961425455e09a19c7dd3ed3fa05 (patch)
tree7ef3fddbd7d2ab9d34e1b54bee6e5b1ed4303026 /test/sequential
parentb88195716f409bbd5830d99d23d4b6de05018207 (diff)
downloadandroid-node-v8-f8c3e258fdaf2961425455e09a19c7dd3ed3fa05.tar.gz
android-node-v8-f8c3e258fdaf2961425455e09a19c7dd3ed3fa05.tar.bz2
android-node-v8-f8c3e258fdaf2961425455e09a19c7dd3ed3fa05.zip
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>
Diffstat (limited to 'test/sequential')
-rw-r--r--test/sequential/test-inspector-module.js11
1 files changed, 11 insertions, 0 deletions
diff --git a/test/sequential/test-inspector-module.js b/test/sequential/test-inspector-module.js
index eaecd49c98..26bb7fe926 100644
--- a/test/sequential/test-inspector-module.js
+++ b/test/sequential/test-inspector-module.js
@@ -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(),
{