Skip to content

Commit b750ff1

Browse files
cola119targos
authored andcommitted
test: remove the legacy url parser function
PR-URL: #42656 Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Darshan Sen <[email protected]> Reviewed-By: Akhil Marsonya <[email protected]> Reviewed-By: James M Snell <[email protected]>
1 parent 01c9f5b commit b750ff1

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');
@@ -417,7 +416,7 @@ class NodeInstance extends EventEmitter {
417416
const port = await this.portPromise;
418417
return http.get({
419418
port,
420-
path: parseURL(devtoolsUrl).path,
419+
path: new URL(devtoolsUrl).pathname,
421420
headers: {
422421
'Connection': 'Upgrade',
423422
'Upgrade': 'websocket',

0 commit comments

Comments
 (0)