mirror of
https://github.com/denoland/deno.git
synced 2025-08-02 10:02:23 +00:00
Avoid fetch segfault on empty Uri (#1394)
This commit is contained in:
parent
105a5193b5
commit
e4be1209b6
4 changed files with 25 additions and 4 deletions
|
@ -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:
|
||||
//
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue