Skip to content

Commit bf9990f

Browse files
committed
test: make inspector strip type pass when path contains unusual chars
1 parent 120ba50 commit bf9990f

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

test/parallel/test-inspector-strip-types.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,10 @@ if (!process.config.variables.node_use_amaro) common.skip('Requires Amaro');
77
const { NodeInstance } = require('../common/inspector-helper.js');
88
const fixtures = require('../common/fixtures');
99
const assert = require('assert');
10+
const { pathToFileURL } = require('url');
1011

1112
const scriptPath = fixtures.path('typescript/ts/test-typescript.ts');
13+
const scriptURL = pathToFileURL(scriptPath);
1214

1315
async function runTest() {
1416
const child = new NodeInstance(
@@ -30,7 +32,7 @@ async function runTest() {
3032
const scriptParsed = await session.waitForNotification((notification) => {
3133
if (notification.method !== 'Debugger.scriptParsed') return false;
3234

33-
return notification.params.url === scriptPath;
35+
return notification.params.url === scriptPath || notification.params.url === scriptURL.href;
3436
});
3537
// Verify that the script has a sourceURL, hinting that it is a generated source.
3638
assert(scriptParsed.params.hasSourceURL || common.isInsideDirWithUnusualChars);

0 commit comments

Comments
 (0)