diff --git a/test/common/inspector-helper.js b/test/common/inspector-helper.js index 0a47cb1d58981a..db00d38715acb8 100644 --- a/test/common/inspector-helper.js +++ b/test/common/inspector-helper.js @@ -5,8 +5,7 @@ const fs = require('fs'); const http = require('http'); const fixtures = require('../common/fixtures'); const { spawn } = require('child_process'); -const { parse: parseURL } = require('url'); -const { pathToFileURL } = require('url'); +const { URL, pathToFileURL } = require('url'); const { EventEmitter } = require('events'); const _MAINSCRIPT = fixtures.path('loop.js'); @@ -417,7 +416,8 @@ class NodeInstance extends EventEmitter { const port = await this.portPromise; return http.get({ port, - path: parseURL(devtoolsUrl).path, + family: 4, + path: new URL(devtoolsUrl).pathname, headers: { 'Connection': 'Upgrade', 'Upgrade': 'websocket',