Skip to content

Commit deb3cf4

Browse files
cola119targos
authored andcommitted
test: remove the legacy url parser function
PR-URL: #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>
1 parent be44b1f commit deb3cf4

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

test/common/inspector-helper.js

+2-3
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,7 @@ const fs = require('fs');
55
const http = require('http');
66
const fixtures = require('../common/fixtures');
77
const { spawn } = require('child_process');
8-
const { parse: parseURL } = require('url');
9-
const { pathToFileURL } = require('url');
8+
const { URL, pathToFileURL } = require('url');
109
const { EventEmitter } = require('events');
1110

1211
const _MAINSCRIPT = fixtures.path('loop.js');
@@ -418,7 +417,7 @@ class NodeInstance extends EventEmitter {
418417
return http.get({
419418
port,
420419
family: 4,
421-
path: parseURL(devtoolsUrl).path,
420+
path: new URL(devtoolsUrl).pathname,
422421
headers: {
423422
'Connection': 'Upgrade',
424423
'Upgrade': 'websocket',

0 commit comments

Comments
 (0)