From 9730482960feb6a8036d28f99a2f73dea695a394 Mon Sep 17 00:00:00 2001 From: Kohei Ueno Date: Fri, 15 Apr 2022 07:20:51 +0900 Subject: [PATCH] test: remove the legacy url parser function PR-URL: https://github.com/nodejs/node/pull/42656 Reviewed-By: Luigi Pinca Reviewed-By: Darshan Sen Reviewed-By: Akhil Marsonya Reviewed-By: James M Snell --- test/common/inspector-helper.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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',