summaryrefslogtreecommitdiff
path: root/test/sequential/test-inspector-contexts.js
diff options
context:
space:
mode:
authorEugene Ostroukhov <eostroukhov@google.com>2018-09-08 19:45:10 -0700
committerEugene Ostroukhov <eostroukhov@google.com>2018-09-17 09:49:53 -0700
commitab5f789e3f3f726702b86bc7b9661895780d4d12 (patch)
tree3c0e365e048ac7e3b0263c4dba86f59b8798e77a /test/sequential/test-inspector-contexts.js
parentab35194cb0297a85de5384b529f2cc03293d93bb (diff)
downloadandroid-node-v8-ab5f789e3f3f726702b86bc7b9661895780d4d12.tar.gz
android-node-v8-ab5f789e3f3f726702b86bc7b9661895780d4d12.tar.bz2
android-node-v8-ab5f789e3f3f726702b86bc7b9661895780d4d12.zip
inspector: enable Inspector JS API in workers
PR-URL: https://github.com/nodejs/node/pull/22769 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: James M Snell <jasnell@gmail.com>
Diffstat (limited to 'test/sequential/test-inspector-contexts.js')
-rw-r--r--test/sequential/test-inspector-contexts.js6
1 files changed, 5 insertions, 1 deletions
diff --git a/test/sequential/test-inspector-contexts.js b/test/sequential/test-inspector-contexts.js
index d2285e8253..793868e3bc 100644
--- a/test/sequential/test-inspector-contexts.js
+++ b/test/sequential/test-inspector-contexts.js
@@ -33,7 +33,11 @@ async function testContextCreatedAndDestroyed() {
// the PID.
strictEqual(name.includes(`[${process.pid}]`), true);
} else {
- strictEqual(`${process.argv0}[${process.pid}]`, name);
+ let expects = `${process.argv0}[${process.pid}]`;
+ if (!common.isMainThread) {
+ expects = `Worker[${require('worker_threads').threadId}]`;
+ }
+ strictEqual(expects, name);
}
strictEqual(origin, '',
JSON.stringify(contextCreated));