diff options
author | Parsa Ghadimi <me@qti3e.com> | 2018-09-14 22:26:37 +0430 |
---|---|---|
committer | Ryan Dahl <ry@tinyclouds.org> | 2018-09-14 12:50:32 -0700 |
commit | 4b1eb855bf8fa33b802f5be67c93217eb582bc24 (patch) | |
tree | 52165e354043494dad5856aa768939fc4fcacc7c /js/fetch_test.ts | |
parent | 662e57b20adc7bbb7037c116f8f72678017db94e (diff) |
Make fetch.blob() work
Diffstat (limited to 'js/fetch_test.ts')
-rw-r--r-- | js/fetch_test.ts | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/js/fetch_test.ts b/js/fetch_test.ts index 2b7f32099..25d8c2ed0 100644 --- a/js/fetch_test.ts +++ b/js/fetch_test.ts @@ -35,3 +35,11 @@ test(async function headersAppend() { } assert(err instanceof TypeError); }); + +testPerm({ net: true }, async function fetchBlob() { + const response = await fetch("http://localhost:4545/package.json"); + const headers = response.headers; + const blob = await response.blob(); + assertEqual(blob.type, headers.get("Content-Type")); + assertEqual(blob.size, Number(headers.get("Content-Length"))); +}); |