summaryrefslogtreecommitdiff
path: root/test/common/inspector-helper.js
diff options
context:
space:
mode:
authorguybedford <guybedford@gmail.com>2018-08-24 18:13:32 +0200
committerMichaƫl Zasso <targos@protonmail.com>2018-09-25 08:53:37 +0200
commitf1b1b73c2ba4dc8d495ef044c7cc1477f4c49c1d (patch)
tree5b288d407aaa3479ff95aad71da7409396e5b6ed /test/common/inspector-helper.js
parenta3b3485b34d3299dcbbce30e2d5ae2266dda5dbb (diff)
downloadnode-new-f1b1b73c2ba4dc8d495ef044c7cc1477f4c49c1d.tar.gz
url: provide pathToFileURL and fileURLToPath
PR-URL: https://github.com/nodejs/node/pull/22506 Reviewed-By: John-David Dalton <john.david.dalton@gmail.com> Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Bradley Farias <bradley.meck@gmail.com> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com> Reviewed-By: Gus Caplan <me@gus.host>
Diffstat (limited to 'test/common/inspector-helper.js')
-rw-r--r--test/common/inspector-helper.js6
1 files changed, 3 insertions, 3 deletions
diff --git a/test/common/inspector-helper.js b/test/common/inspector-helper.js
index 84393c4281..ae8fd9732d 100644
--- a/test/common/inspector-helper.js
+++ b/test/common/inspector-helper.js
@@ -6,7 +6,7 @@ const http = require('http');
const fixtures = require('../common/fixtures');
const { spawn } = require('child_process');
const { parse: parseURL } = require('url');
-const { getURLFromFilePath } = require('internal/url');
+const { pathToFileURL } = require('internal/url');
const { EventEmitter } = require('events');
const _MAINSCRIPT = fixtures.path('loop.js');
@@ -174,7 +174,7 @@ class InspectorSession {
const { scriptId, url } = message.params;
this._scriptsIdsByUrl.set(scriptId, url);
const fileUrl = url.startsWith('file:') ?
- url : getURLFromFilePath(url).toString();
+ url : pathToFileURL(url).toString();
if (fileUrl === this.scriptURL().toString()) {
this.mainScriptId = scriptId;
}
@@ -309,7 +309,7 @@ class InspectorSession {
}
scriptURL() {
- return getURLFromFilePath(this.scriptPath());
+ return pathToFileURL(this.scriptPath());
}
}