test: fix some tests when path contains `%` · nodejs/node@fdae57f · GitHub
Skip to content

Commit fdae57f

Browse files
aduh95targos
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 4352d9c commit fdae57f

3 files changed

Lines changed: 4 additions & 4 deletions

File tree

test/common/inspector-helper.js

Lines changed: 2 additions & 2 deletions

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

Lines 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(

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

Lines changed: 1 addition & 1 deletion

0 commit comments

Comments
 (0)