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 c56e324

Browse filesBrowse files
aduh95targos
authored andcommitted
test: fix test-vm-context-dont-contextify when path contains a space
Because of the double encoding, the test would fail as soon as the path contains a space or any other char that's already encoded by `pathToFileURL`. PR-URL: #55026 Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Richard Lau <rlau@redhat.com> Reviewed-By: Chengzhong Wu <legendecas@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
1 parent b6fc9ad commit c56e324
Copy full SHA for c56e324

File tree

Expand file treeCollapse file tree

1 file changed

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

1 file changed

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

‎test/parallel/test-vm-context-dont-contextify.js‎

Copy file name to clipboardExpand all lines: test/parallel/test-vm-context-dont-contextify.js
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ function checkFrozen(context) {
176176
const namespace = await import(moduleUrl.href);
177177
// Check dynamic import works
178178
const context = vm.createContext(vm.constants.DONT_CONTEXTIFY);
179-
const script = new vm.Script(`import('${encodeURI(moduleUrl.href)}')`, {
179+
const script = new vm.Script(`import(${JSON.stringify(moduleUrl)})`, {
180180
importModuleDynamically: vm.constants.USE_MAIN_CONTEXT_DEFAULT_LOADER,
181181
});
182182
const promise = script.runInContext(context);

0 commit comments

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