11cb0ef41Sopenharmony_ci'use strict'; 21cb0ef41Sopenharmony_ciconst common = require('../common'); 31cb0ef41Sopenharmony_ci 41cb0ef41Sopenharmony_cicommon.skipIfInspectorDisabled(); 51cb0ef41Sopenharmony_ci 61cb0ef41Sopenharmony_ciconst assert = require('assert'); 71cb0ef41Sopenharmony_ciconst { NodeInstance } = require('../common/inspector-helper.js'); 81cb0ef41Sopenharmony_ci 91cb0ef41Sopenharmony_ciasync function test() { 101cb0ef41Sopenharmony_ci const madeUpHost = '111.111.111.111:11111'; 111cb0ef41Sopenharmony_ci const child = new NodeInstance(undefined, 'var a = 1'); 121cb0ef41Sopenharmony_ci const response = await child.httpGet(null, '/json', madeUpHost); 131cb0ef41Sopenharmony_ci assert.ok( 141cb0ef41Sopenharmony_ci response[0].webSocketDebuggerUrl.startsWith(`ws://${madeUpHost}`), 151cb0ef41Sopenharmony_ci response[0].webSocketDebuggerUrl); 161cb0ef41Sopenharmony_ci child.kill(); 171cb0ef41Sopenharmony_ci} 181cb0ef41Sopenharmony_ci 191cb0ef41Sopenharmony_citest().then(common.mustCall()); 20