aboutsummaryrefslogtreecommitdiff
path: root/test/sequential
diff options
context:
space:
mode:
authorMichaël Zasso <targos@protonmail.com>2018-03-16 09:17:58 +0100
committerMichaël Zasso <targos@protonmail.com>2018-03-22 08:24:31 +0100
commit4e1f0907dae9916215985a9f81bf3dec1eeaeaef (patch)
tree32f5784431d3052ec769a3e24cb82d0b59809a81 /test/sequential
parent258bcb9bffb1824d65a76eb30fcd0adda0f753a0 (diff)
downloadandroid-node-v8-4e1f0907dae9916215985a9f81bf3dec1eeaeaef.tar.gz
android-node-v8-4e1f0907dae9916215985a9f81bf3dec1eeaeaef.tar.bz2
android-node-v8-4e1f0907dae9916215985a9f81bf3dec1eeaeaef.zip
inspector: migrate errors from C++ to JS
Assign a code to a user-facing error. Turn other internal-only errors to checks. PR-URL: https://github.com/nodejs/node/pull/19387 Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Eugene Ostroukhov <eostroukhov@google.com> Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Diffstat (limited to 'test/sequential')
-rw-r--r--test/sequential/test-inspector-module.js12
1 files changed, 11 insertions, 1 deletions
diff --git a/test/sequential/test-inspector-module.js b/test/sequential/test-inspector-module.js
index f97d712979..2435347e79 100644
--- a/test/sequential/test-inspector-module.js
+++ b/test/sequential/test-inspector-module.js
@@ -51,7 +51,17 @@ common.expectsError(
{
code: 'ERR_INSPECTOR_ALREADY_CONNECTED',
type: Error,
- message: 'The inspector is already connected'
+ message: 'The inspector session is already connected'
+ }
+);
+
+const session2 = new Session();
+common.expectsError(
+ () => session2.connect(),
+ {
+ code: 'ERR_INSPECTOR_ALREADY_CONNECTED',
+ type: Error,
+ message: 'Another inspector session is already connected'
}
);