summaryrefslogtreecommitdiff
path: root/cli/tests/testdata/dynamic_import
diff options
context:
space:
mode:
Diffstat (limited to 'cli/tests/testdata/dynamic_import')
-rw-r--r--cli/tests/testdata/dynamic_import/b.js2
-rw-r--r--cli/tests/testdata/dynamic_import/c.js2
-rw-r--r--cli/tests/testdata/dynamic_import/empty_1.ts0
-rw-r--r--cli/tests/testdata/dynamic_import/empty_2.ts0
-rw-r--r--cli/tests/testdata/dynamic_import/permissions_blob_local.ts6
-rw-r--r--cli/tests/testdata/dynamic_import/permissions_blob_local.ts.out5
-rw-r--r--cli/tests/testdata/dynamic_import/permissions_blob_remote.ts4
-rw-r--r--cli/tests/testdata/dynamic_import/permissions_blob_remote.ts.out5
-rw-r--r--cli/tests/testdata/dynamic_import/permissions_data_local.ts5
-rw-r--r--cli/tests/testdata/dynamic_import/permissions_data_local.ts.out5
-rw-r--r--cli/tests/testdata/dynamic_import/permissions_data_remote.ts3
-rw-r--r--cli/tests/testdata/dynamic_import/permissions_data_remote.ts.out5
-rw-r--r--cli/tests/testdata/dynamic_import/permissions_remote_remote.ts3
-rw-r--r--cli/tests/testdata/dynamic_import/permissions_remote_remote.ts.out5
-rw-r--r--cli/tests/testdata/dynamic_import/static_analysis_no_permissions.ts13
-rw-r--r--cli/tests/testdata/dynamic_import/static_analysis_no_permissions.ts.out2
-rw-r--r--cli/tests/testdata/dynamic_import/static_remote.ts2
17 files changed, 0 insertions, 67 deletions
diff --git a/cli/tests/testdata/dynamic_import/b.js b/cli/tests/testdata/dynamic_import/b.js
deleted file mode 100644
index 6ea50d360..000000000
--- a/cli/tests/testdata/dynamic_import/b.js
+++ /dev/null
@@ -1,2 +0,0 @@
-import "./bad.mjs";
-export default () => "error";
diff --git a/cli/tests/testdata/dynamic_import/c.js b/cli/tests/testdata/dynamic_import/c.js
deleted file mode 100644
index 20546455e..000000000
--- a/cli/tests/testdata/dynamic_import/c.js
+++ /dev/null
@@ -1,2 +0,0 @@
-await import("./bad2.mjs");
-export default () => "error";
diff --git a/cli/tests/testdata/dynamic_import/empty_1.ts b/cli/tests/testdata/dynamic_import/empty_1.ts
deleted file mode 100644
index e69de29bb..000000000
--- a/cli/tests/testdata/dynamic_import/empty_1.ts
+++ /dev/null
diff --git a/cli/tests/testdata/dynamic_import/empty_2.ts b/cli/tests/testdata/dynamic_import/empty_2.ts
deleted file mode 100644
index e69de29bb..000000000
--- a/cli/tests/testdata/dynamic_import/empty_2.ts
+++ /dev/null
diff --git a/cli/tests/testdata/dynamic_import/permissions_blob_local.ts b/cli/tests/testdata/dynamic_import/permissions_blob_local.ts
deleted file mode 100644
index 9ef4158ce..000000000
--- a/cli/tests/testdata/dynamic_import/permissions_blob_local.ts
+++ /dev/null
@@ -1,6 +0,0 @@
-// This file doesn't really exist, but it doesn't matter, a "PermissionsDenied" error should be thrown.
-const code = `import "file:///${
- Deno.build.os == "windows" ? "C:/" : ""
-}local_file.ts";`;
-const blob = new Blob([code]);
-await import(URL.createObjectURL(blob));
diff --git a/cli/tests/testdata/dynamic_import/permissions_blob_local.ts.out b/cli/tests/testdata/dynamic_import/permissions_blob_local.ts.out
deleted file mode 100644
index b7b246ba2..000000000
--- a/cli/tests/testdata/dynamic_import/permissions_blob_local.ts.out
+++ /dev/null
@@ -1,5 +0,0 @@
-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:8
-await import(URL.createObjectURL(blob));
-^
- at async file://[WILDCARD]/permissions_blob_local.ts:6:1
diff --git a/cli/tests/testdata/dynamic_import/permissions_blob_remote.ts b/cli/tests/testdata/dynamic_import/permissions_blob_remote.ts
deleted file mode 100644
index 1e2c8c21a..000000000
--- a/cli/tests/testdata/dynamic_import/permissions_blob_remote.ts
+++ /dev/null
@@ -1,4 +0,0 @@
-// This file doesn't really exist, but it doesn't matter, a "PermissionsDenied" error should be thrown.
-const code = `import "https://example.com/some/file.ts";`;
-const blob = new Blob([code]);
-await import(URL.createObjectURL(blob));
diff --git a/cli/tests/testdata/dynamic_import/permissions_blob_remote.ts.out b/cli/tests/testdata/dynamic_import/permissions_blob_remote.ts.out
deleted file mode 100644
index a00c02d72..000000000
--- a/cli/tests/testdata/dynamic_import/permissions_blob_remote.ts.out
+++ /dev/null
@@ -1,5 +0,0 @@
-error: Uncaught (in promise) TypeError: Requires net access to "example.com", run again with the --allow-net flag
- at blob:null/[WILDCARD]:1:8
-await import(URL.createObjectURL(blob));
-^
- at async file:///[WILDCARD]/dynamic_import/permissions_blob_remote.ts:4:1
diff --git a/cli/tests/testdata/dynamic_import/permissions_data_local.ts b/cli/tests/testdata/dynamic_import/permissions_data_local.ts
deleted file mode 100644
index be4fc1c34..000000000
--- a/cli/tests/testdata/dynamic_import/permissions_data_local.ts
+++ /dev/null
@@ -1,5 +0,0 @@
-// This file doesn't really exist, but it doesn't matter, a "PermissionsDenied" error should be thrown.
-const code = `import "file:///${
- Deno.build.os == "windows" ? "C:/" : ""
-}local_file.ts";`;
-await import(`data:application/javascript;base64,${btoa(code)}`);
diff --git a/cli/tests/testdata/dynamic_import/permissions_data_local.ts.out b/cli/tests/testdata/dynamic_import/permissions_data_local.ts.out
deleted file mode 100644
index 98c8a7310..000000000
--- a/cli/tests/testdata/dynamic_import/permissions_data_local.ts.out
+++ /dev/null
@@ -1,5 +0,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:8
-await import(`data:application/javascript;base64,${btoa(code)}`);
-^
- at async file:///[WILDCARD]/dynamic_import/permissions_data_local.ts:5:1
diff --git a/cli/tests/testdata/dynamic_import/permissions_data_remote.ts b/cli/tests/testdata/dynamic_import/permissions_data_remote.ts
deleted file mode 100644
index b0a9540c3..000000000
--- a/cli/tests/testdata/dynamic_import/permissions_data_remote.ts
+++ /dev/null
@@ -1,3 +0,0 @@
-// This file doesn't really exist, but it doesn't matter, a "PermissionsDenied" error should be thrown.
-const code = `import "https://example.com/some/file.ts";`;
-await import(`data:application/javascript;base64,${btoa(code)}`);
diff --git a/cli/tests/testdata/dynamic_import/permissions_data_remote.ts.out b/cli/tests/testdata/dynamic_import/permissions_data_remote.ts.out
deleted file mode 100644
index cb2a7ccf7..000000000
--- a/cli/tests/testdata/dynamic_import/permissions_data_remote.ts.out
+++ /dev/null
@@ -1,5 +0,0 @@
-error: Uncaught (in promise) TypeError: Requires net access to "example.com", run again with the --allow-net flag
- at data:application/javascript;base64,aW1wb3J0ICJodHRwczovL2V4YW1wbGUuY29tL3NvbWUvZmlsZS50cyI7:1:8
-await import(`data:application/javascript;base64,${btoa(code)}`);
-^
- at async file:///[WILDCARD]/dynamic_import/permissions_data_remote.ts:3:1
diff --git a/cli/tests/testdata/dynamic_import/permissions_remote_remote.ts b/cli/tests/testdata/dynamic_import/permissions_remote_remote.ts
deleted file mode 100644
index 65a254191..000000000
--- a/cli/tests/testdata/dynamic_import/permissions_remote_remote.ts
+++ /dev/null
@@ -1,3 +0,0 @@
-await import(
- "" + "http://localhost:4545/dynamic_import/static_remote.ts"
-);
diff --git a/cli/tests/testdata/dynamic_import/permissions_remote_remote.ts.out b/cli/tests/testdata/dynamic_import/permissions_remote_remote.ts.out
deleted file mode 100644
index bd88dd4d9..000000000
--- a/cli/tests/testdata/dynamic_import/permissions_remote_remote.ts.out
+++ /dev/null
@@ -1,5 +0,0 @@
-error: Uncaught (in promise) TypeError: Requires net access to "example.com", run again with the --allow-net flag
- at http://localhost:4545/dynamic_import/static_remote.ts:2:8
-await import(
-^
- at async file:///[WILDCARD]/dynamic_import/permissions_remote_remote.ts:1:1
diff --git a/cli/tests/testdata/dynamic_import/static_analysis_no_permissions.ts b/cli/tests/testdata/dynamic_import/static_analysis_no_permissions.ts
deleted file mode 100644
index de75ba87b..000000000
--- a/cli/tests/testdata/dynamic_import/static_analysis_no_permissions.ts
+++ /dev/null
@@ -1,13 +0,0 @@
-try {
- await import("./empty_1.ts");
- console.log("✅ Succeeded importing statically analyzable specifier");
-} catch {
- console.log("❌ Failed importing statically analyzable specifier");
-}
-
-try {
- await import("" + "./empty_2.ts");
- console.log("❌ Succeeded importing non-statically analyzable specifier");
-} catch {
- console.log("✅ Failed importing non-statically analyzable specifier");
-}
diff --git a/cli/tests/testdata/dynamic_import/static_analysis_no_permissions.ts.out b/cli/tests/testdata/dynamic_import/static_analysis_no_permissions.ts.out
deleted file mode 100644
index ba9249ab0..000000000
--- a/cli/tests/testdata/dynamic_import/static_analysis_no_permissions.ts.out
+++ /dev/null
@@ -1,2 +0,0 @@
-✅ Succeeded importing statically analyzable specifier
-✅ Failed importing non-statically analyzable specifier
diff --git a/cli/tests/testdata/dynamic_import/static_remote.ts b/cli/tests/testdata/dynamic_import/static_remote.ts
deleted file mode 100644
index 2d6e820fd..000000000
--- a/cli/tests/testdata/dynamic_import/static_remote.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-// This file doesn't really exist, but it doesn't matter, a "PermissionsDenied" error should be thrown.
-import "https://example.com/some/file.ts";