Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 7c88739

Browse filesBrowse files
aduh95marco-ippolito
authored andcommitted
test: fix some tests when path contains %
Tests should pass even if the path where the repo is cloned contains URL-significant chars. PR-URL: #55082 Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com>
1 parent 2be5d61 commit 7c88739
Copy full SHA for 7c88739

File tree

Expand file treeCollapse file tree

3 files changed

+4
-4
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

3 files changed

+4
-4
lines changed
Open diff view settings
Collapse file

‎test/common/inspector-helper.js‎

Copy file name to clipboardExpand all lines: test/common/inspector-helper.js
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -255,8 +255,8 @@ class InspectorSession {
255255
const callFrame = message.params.callFrames[0];
256256
const location = callFrame.location;
257257
const scriptPath = this._scriptsIdsByUrl.get(location.scriptId);
258-
assert.strictEqual(scriptPath.toString(),
259-
expectedScriptPath.toString(),
258+
assert.strictEqual(decodeURIComponent(scriptPath),
259+
decodeURIComponent(expectedScriptPath),
260260
`${scriptPath} !== ${expectedScriptPath}`);
261261
assert.strictEqual(location.lineNumber, line);
262262
return true;
Collapse file

‎test/es-module/test-esm-import-meta-resolve.mjs‎

Copy file name to clipboardExpand all lines: test/es-module/test-esm-import-meta-resolve.mjs
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ assert.deepStrictEqual(
4545
{ default: 'some://weird/protocol' },
4646
);
4747
assert.deepStrictEqual(
48-
{ ...await import(`data:text/javascript,export default import.meta.resolve("baz/", ${JSON.stringify(fixtures)})`) },
48+
{ ...await import(`data:text/javascript,export default import.meta.resolve("baz/", ${encodeURIComponent(JSON.stringify(fixtures))})`) },
4949
{ default: fixtures + 'node_modules/baz/' },
5050
);
5151
assert.deepStrictEqual(
Collapse file

‎test/es-module/test-esm-loader-hooks.mjs‎

Copy file name to clipboardExpand all lines: test/es-module/test-esm-loader-hooks.mjs
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -787,7 +787,7 @@ describe('Loader hooks', { concurrency: true }, () => {
787787
const { code, signal, stdout, stderr } = await spawnPromisified(execPath, [
788788
'--no-warnings',
789789
'--experimental-loader',
790-
`data:text/javascript,const fixtures=${JSON.stringify(fixtures.path('empty.js'))};export ${
790+
`data:text/javascript,const fixtures=${encodeURI(JSON.stringify(fixtures.path('empty.js')))};export ${
791791
encodeURIComponent(function resolve(s, c, n) {
792792
if (s.endsWith('entry-point')) {
793793
return {

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.