test: remove the legacy url parser function

PR-URL: https://github.com/nodejs/node/pull/42656
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Darshan Sen <raisinten@gmail.com>
Reviewed-By: Akhil Marsonya <akhil.marsonya27@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
This commit is contained in:
Kohei Ueno authored and Michaël Zasso committed 2022-07-31 09:44:37 +02:00
1 parent 01c9f5b2ae
commit b750ff1452
1 file changed
+2 -3
+2 -3
View File
@@ -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',