mirror of
https://github.com/nodejs/node.git
synced 2024-11-24 20:29:23 +01:00
e2ea73af04
PR-URL: https://github.com/nodejs/node/pull/32673 Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Eugene Ostroukhov <eostroukhov@google.com> Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
20 lines
558 B
JavaScript
20 lines
558 B
JavaScript
'use strict';
|
|
const common = require('../common');
|
|
|
|
common.skipIfInspectorDisabled();
|
|
|
|
const assert = require('assert');
|
|
const { NodeInstance } = require('../common/inspector-helper.js');
|
|
|
|
async function test() {
|
|
const madeUpHost = '111.111.111.111:11111';
|
|
const child = new NodeInstance(undefined, 'var a = 1');
|
|
const response = await child.httpGet(null, '/json', madeUpHost);
|
|
assert.ok(
|
|
response[0].webSocketDebuggerUrl.startsWith(`ws://${madeUpHost}`),
|
|
response[0].webSocketDebuggerUrl);
|
|
child.kill();
|
|
}
|
|
|
|
test().then(common.mustCall());
|