summaryrefslogtreecommitdiff
path: root/test/sequential/test-inspector-contexts.js
diff options
context:
space:
mode:
Diffstat (limited to 'test/sequential/test-inspector-contexts.js')
-rw-r--r--test/sequential/test-inspector-contexts.js15
1 files changed, 12 insertions, 3 deletions
diff --git a/test/sequential/test-inspector-contexts.js b/test/sequential/test-inspector-contexts.js
index 54acfab0d5..c7db962f2a 100644
--- a/test/sequential/test-inspector-contexts.js
+++ b/test/sequential/test-inspector-contexts.js
@@ -23,9 +23,18 @@ async function testContextCreatedAndDestroyed() {
session.post('Runtime.enable');
let contextCreated = await mainContextPromise;
- strictEqual('Node.js Main Context',
- contextCreated.params.context.name,
- JSON.stringify(contextCreated));
+ {
+ const { name } = contextCreated.params.context;
+ if (common.isSunOS || common.isWindows) {
+ // uv_get_process_title() is unimplemented on Solaris-likes, it returns
+ // an empy string. On the Windows CI buildbots it returns "Administrator:
+ // Windows PowerShell[42]" because of a GetConsoleTitle() quirk. Not much
+ // we can do about either, just verify that it contains the PID.
+ strictEqual(name.includes(`[${process.pid}]`), true);
+ } else {
+ strictEqual(`${process.argv0}[${process.pid}]`, name);
+ }
+ }
const secondContextCreatedPromise =
notificationPromise('Runtime.executionContextCreated');