diff options
Diffstat (limited to 'cli/js/fetch_test.ts')
-rw-r--r-- | cli/js/fetch_test.ts | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/cli/js/fetch_test.ts b/cli/js/fetch_test.ts index 299cbe05f..4fc2339b6 100644 --- a/cli/js/fetch_test.ts +++ b/cli/js/fetch_test.ts @@ -42,6 +42,13 @@ testPerm({ net: true }, async function fetchUrl(): Promise<void> { assertEquals(response.url, "http://localhost:4545/cli/tests/fixture.json"); }); +testPerm({ net: true }, async function fetchURL(): Promise<void> { + const response = await fetch( + new URL("http://localhost:4545/cli/tests/fixture.json") + ); + assertEquals(response.url, "http://localhost:4545/cli/tests/fixture.json"); +}); + testPerm({ net: true }, async function fetchHeaders(): Promise<void> { const response = await fetch("http://localhost:4545/cli/tests/fixture.json"); const headers = response.headers; |