summaryrefslogtreecommitdiff
path: root/cli/tests
diff options
context:
space:
mode:
Diffstat (limited to 'cli/tests')
-rw-r--r--cli/tests/integration_tests.rs6
-rw-r--r--cli/tests/redirect_cache.out6
-rw-r--r--cli/tests/subdir/redirects/a.ts9
-rw-r--r--cli/tests/subdir/redirects/b.ts5
4 files changed, 26 insertions, 0 deletions
diff --git a/cli/tests/integration_tests.rs b/cli/tests/integration_tests.rs
index cfc946a36..da0a311bb 100644
--- a/cli/tests/integration_tests.rs
+++ b/cli/tests/integration_tests.rs
@@ -2859,6 +2859,12 @@ itest!(proto_exploit {
output: "proto_exploit.js.out",
});
+itest!(redirect_cache {
+ http_server: true,
+ args: "cache --reload http://localhost:4548/cli/tests/subdir/redirects/a.ts",
+ output: "redirect_cache.out",
+});
+
itest!(deno_test_coverage {
args: "test --coverage --unstable test_coverage.ts",
output: "test_coverage.out",
diff --git a/cli/tests/redirect_cache.out b/cli/tests/redirect_cache.out
new file mode 100644
index 000000000..ad26d0108
--- /dev/null
+++ b/cli/tests/redirect_cache.out
@@ -0,0 +1,6 @@
+Download http://localhost:4548/cli/tests/subdir/redirects/a.ts
+Download http://localhost:4546/cli/tests/subdir/redirects/a.ts
+Download http://localhost:4545/cli/tests/subdir/redirects/a.ts
+Download http://localhost:4545/cli/tests/subdir/redirects/b.ts
+Download http://localhost:4545/cli/tests/subdir/redirects/a.ts
+Check http://localhost:4548/cli/tests/subdir/redirects/a.ts
diff --git a/cli/tests/subdir/redirects/a.ts b/cli/tests/subdir/redirects/a.ts
new file mode 100644
index 000000000..071ee4728
--- /dev/null
+++ b/cli/tests/subdir/redirects/a.ts
@@ -0,0 +1,9 @@
+import { createA } from "./b.ts";
+
+export class A {
+ private _a = "a";
+}
+
+export function start(): A {
+ return createA();
+}
diff --git a/cli/tests/subdir/redirects/b.ts b/cli/tests/subdir/redirects/b.ts
new file mode 100644
index 000000000..cdb71eaae
--- /dev/null
+++ b/cli/tests/subdir/redirects/b.ts
@@ -0,0 +1,5 @@
+import { A } from "./a.ts";
+
+export function createA(): A {
+ return new A();
+}