summaryrefslogtreecommitdiff
path: root/js/fetch_test.ts
diff options
context:
space:
mode:
Diffstat (limited to 'js/fetch_test.ts')
-rw-r--r--js/fetch_test.ts11
1 files changed, 11 insertions, 0 deletions
diff --git a/js/fetch_test.ts b/js/fetch_test.ts
index 74a383649..cd3e6ebf0 100644
--- a/js/fetch_test.ts
+++ b/js/fetch_test.ts
@@ -47,6 +47,17 @@ testPerm({ net: true }, async function responseClone() {
}
});
+testPerm({ net: true }, async function fetchEmptyInvalid() {
+ let err;
+ try {
+ await fetch("");
+ } catch (err_) {
+ err = err_;
+ }
+ assertEqual(err.kind, deno.ErrorKind.InvalidUri);
+ assertEqual(err.name, "InvalidUri");
+});
+
// TODO(ry) The following tests work but are flaky. There's a race condition
// somewhere. Here is what one of these flaky failures looks like:
//