diff options
author | Kohei Ueno <kohei.ueno119@gmail.com> | 2022-04-15 01:20:51 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-04-15 01:20:51 +0300 |
commit | 24adba675179ebba363d46f5dd30685d58cdb7f4 (patch) | |
tree | 56eee6bd92919751e42af1070d6274c87f09890d | |
parent | 1285ac116d4334d1be3ce324591d28ec27bd61b2 (diff) |
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>
-rw-r--r-- | test/common/inspector-helper.js | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/test/common/inspector-helper.js b/test/common/inspector-helper.js index 28b5ab5209a..cebc048362e 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'); @@ -418,7 +417,7 @@ class NodeInstance extends EventEmitter { return http.get({ port, family: 4, - path: parseURL(devtoolsUrl).path, + path: new URL(devtoolsUrl).pathname, headers: { 'Connection': 'Upgrade', 'Upgrade': 'websocket', |