diff options
author | 2023-03-22 15:01:01 -0700 | |
---|---|---|
committer | 2023-03-22 15:01:01 -0700 | |
commit | a5f92224b586289fc72f0abdb68b08eef9f017db (patch) | |
tree | 6092397858776820b431b0dffa635d8bc3b3185e /test/js/web/fetch/fetch-gzip.test.ts | |
parent | 2bdaa81b1c2325687c5115b4e97627533cb3646b (diff) | |
download | bun-a5f92224b586289fc72f0abdb68b08eef9f017db.tar.gz bun-a5f92224b586289fc72f0abdb68b08eef9f017db.tar.zst bun-a5f92224b586289fc72f0abdb68b08eef9f017db.zip |
Fix types (#2453)
* WIP
* WIP
* WIP
* WIP
* Improve typechecking in type files
* Fix typechecking
* Update
* Update submodule
* CI for typechecking
* Add ci
* Update commands
* Format after build
* Dont use bunx
* Rename job
* Use nodemodules prettier
* Update workflow
* Use symlink
* Debug
* Debug
* Clean up and rename jobs
Diffstat (limited to 'test/js/web/fetch/fetch-gzip.test.ts')
-rw-r--r-- | test/js/web/fetch/fetch-gzip.test.ts | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/test/js/web/fetch/fetch-gzip.test.ts b/test/js/web/fetch/fetch-gzip.test.ts index 91ea8de9f..076b5845b 100644 --- a/test/js/web/fetch/fetch-gzip.test.ts +++ b/test/js/web/fetch/fetch-gzip.test.ts @@ -1,7 +1,6 @@ -import { concatArrayBuffers } from "bun"; -import { it, describe, expect } from "bun:test"; -import fs from "fs"; -import { gc, gcTick } from "harness"; +import { concatArrayBuffers, Socket, TCPSocketListener } from "bun"; +import { it, expect } from "bun:test"; +import { gcTick } from "harness"; it("fetch() with a buffered gzip response works (one chunk)", async () => { var server = Bun.serve({ @@ -122,9 +121,15 @@ it("fetch() with a gzip response works (one chunk, streamed, with a delay", asyn server.stop(); }); +const arg = Bun.listen({ + hostname: "asdf", + port: 1234, + socket: {}, +}); + it("fetch() with a gzip response works (multiple chunks, TCP server", async done => { const compressed = await Bun.file(import.meta.dir + "/fixture.html.gz").arrayBuffer(); - var socketToClose; + var socketToClose!: Socket; const server = Bun.listen({ port: 0, hostname: "0.0.0.0", @@ -134,7 +139,7 @@ it("fetch() with a gzip response works (multiple chunks, TCP server", async done var corked: any[] = []; var cork = true; - async function write(chunk) { + async function write(chunk: any) { await new Promise<void>((resolve, reject) => { if (cork) { corked.push(chunk); |