From 339e2702684b3554a73e43b4a25257038f038c34 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 | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/test/common/inspector-helper.js b/test/common/inspector-helper.js index 28b5ab5209a298..cebc048362ef40 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'); @@ -418,7 +417,7 @@ class NodeInstance extends EventEmitter { return http.get({ port, family: 4, - path: parseURL(devtoolsUrl).path, + path: new URL(devtoolsUrl).pathname, headers: { 'Connection': 'Upgrade', 'Upgrade': 'websocket',