From 13079c43cbf26b0c89eaa588a51b31709ba35e1e 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 0a47cb1d589..e8e2c2de5cd 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,7 @@ class NodeInstance extends EventEmitter { const port = await this.portPromise; return http.get({ port, - path: parseURL(devtoolsUrl).path, + path: new URL(devtoolsUrl).pathname, headers: { 'Connection': 'Upgrade', 'Upgrade': 'websocket',