diff options
Diffstat (limited to 'cli/tests/unit/fetch_test.ts')
-rw-r--r-- | cli/tests/unit/fetch_test.ts | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/cli/tests/unit/fetch_test.ts b/cli/tests/unit/fetch_test.ts index b755e8ec9..500891e08 100644 --- a/cli/tests/unit/fetch_test.ts +++ b/cli/tests/unit/fetch_test.ts @@ -93,6 +93,19 @@ Deno.test( }, ); +Deno.test( + { permissions: { net: true } }, + async function fetchMalformedUriError() { + await assertRejects( + async () => { + const url = new URL("http://{{google/"); + await fetch(url); + }, + TypeError, + ); + }, +); + Deno.test({ permissions: { net: true } }, async function fetchJsonSuccess() { const response = await fetch("http://localhost:4545/assets/fixture.json"); const json = await response.json(); |