Skip to content

Commit 8ffde83

Browse files
committed
test: make inspector strip type pass when path contains unusual chars
1 parent f0a2506 commit 8ffde83

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

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

Lines changed: 4 additions & 2 deletions
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(
@@ -29,10 +31,10 @@ async function runTest() {
2931
const scriptParsed = await session.waitForNotification((notification) => {
3032
if (notification.method !== 'Debugger.scriptParsed') return false;
3133

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

3739
await session.waitForPauseOnStart();
3840
await session.runToCompletion();

0 commit comments

Comments
 (0)