Skip to content

Commit e8d24bf

Browse files
committed
test: remove the legacy url parser function
1 parent 44fdf95 commit e8d24bf

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)