1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2025-01-08 15:19:40 -05:00

tests: fix broken tests on main (#10663)

This commit is contained in:
Luca Casonato 2021-05-17 12:59:11 +02:00 committed by GitHub
parent 75d547809f
commit 30b2779bb6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 21 additions and 17 deletions

View file

@ -1,4 +1,6 @@
// This file doesn't really exist, but it doesn't matter, a "PermissionsDenied" error should be thrown.
const code = `import "file:///local_file.ts";`;
const code = `import "file:///${
Deno.build.os == "windows" ? "C:/" : ""
}local_file.ts";`;
const blob = new Blob([code]);
await import(URL.createObjectURL(blob));

View file

@ -1,5 +1,5 @@
error: Uncaught (in promise) TypeError: Requires read access to "/local_file.ts", run again with the --allow-read flag
error: Uncaught (in promise) TypeError: Requires read access to "[WILDCARD]local_file.ts", run again with the --allow-read flag
at blob:null/[WILDCARD]:1:0
await import(URL.createObjectURL(blob));
^
at async file:///[WILDCARD]/cli/tests/dynamic_import/permissions_blob_local.ts:4:1
at async file:///[WILDCARD]/cli/tests/dynamic_import/permissions_blob_local.ts:6:1

View file

@ -1,3 +1,5 @@
// This file doesn't really exist, but it doesn't matter, a "PermissionsDenied" error should be thrown.
const code = `import "file:///local_file.ts";`;
const code = `import "file:///${
Deno.build.os == "windows" ? "C:/" : ""
}local_file.ts";`;
await import(`data:application/javascript;base64,${btoa(code)}`);

View file

@ -1,5 +1,5 @@
error: Uncaught (in promise) TypeError: Requires read access to "/local_file.ts", run again with the --allow-read flag
at data:application/javascript;base64,aW1wb3J0ICJmaWxlOi8vL2xvY2FsX2ZpbGUudHMiOw==:1:0
error: Uncaught (in promise) TypeError: Requires read access to "[WILDCARD]local_file.ts", run again with the --allow-read flag
at data:application/javascript;base64,[WILDCARD]:1:0
await import(`data:application/javascript;base64,${btoa(code)}`);
^
at async file:///[WILDCARD]/cli/tests/dynamic_import/permissions_data_local.ts:3:1
at async file:///[WILDCARD]/cli/tests/dynamic_import/permissions_data_local.ts:5:1

View file

@ -1,4 +1,6 @@
// This file doesn't really exist, but it doesn't matter, a "PermissionsDenied" error should be thrown.
const code = `import "file:///local_file.ts";`;
const code = `import "file:///${
Deno.build.os == "windows" ? "C:/" : ""
}local_file.ts";`;
const blob = new Blob([code]);
new Worker(URL.createObjectURL(blob), { type: "module" });

View file

@ -1,4 +1,4 @@
error: Uncaught (in worker "") Requires read access to "/local_file.ts", run again with the --allow-read flag
error: Uncaught (in worker "") Requires read access to "[WILDCARD]local_file.ts", run again with the --allow-read flag
at blob:null/[WILDCARD]:1:0
error: Uncaught (in promise) Error: Unhandled error event reached main worker.
at Worker.#poll (deno:runtime/js/11_workers.js:246:23)

View file

@ -1,5 +1,7 @@
// This file doesn't really exist, but it doesn't matter, a "PermissionsDenied" error should be thrown.
const code = `import "file:///local_file.ts";`;
const code = `import "file:///${
Deno.build.os == "windows" ? "C:/" : ""
}local_file.ts";`;
new Worker(`data:application/javascript;base64,${btoa(code)}`, {
type: "module",
});

View file

@ -1,4 +1,4 @@
error: Uncaught (in worker "") Requires read access to "/local_file.ts", run again with the --allow-read flag
at data:application/javascript;base64,aW1wb3J0ICJmaWxlOi8vL2xvY2FsX2ZpbGUudHMiOw==:1:0
error: Uncaught (in worker "") Requires read access to "[WILDCARD]local_file.ts", run again with the --allow-read flag
at data:application/javascript;base64,[WILDCARD]:1:0
error: Uncaught (in promise) Error: Unhandled error event reached main worker.
at Worker.#poll (deno:runtime/js/11_workers.js:246:23)

View file

@ -2,9 +2,5 @@ error: Uncaught (in worker "") (in promise) TypeError: Requires net access to "e
await import("https://example.com/some/file.ts");
^
at async http://localhost:4545/cli/tests/workers/dynamic_remote.ts:2:1
error: Uncaught (in worker "") TypeError: Requires net access to "example.com", run again with the --allow-net flag
await import("https://example.com/some/file.ts");
^
at async http://localhost:4545/cli/tests/workers/dynamic_remote.ts:2:1
error: Uncaught (in promise) Error: Unhandled error event reached main worker.
[WILDCARD]error: Uncaught (in promise) Error: Unhandled error event reached main worker.
at Worker.#poll (deno:runtime/js/11_workers.js:246:23)