From a5f92224b586289fc72f0abdb68b08eef9f017db Mon Sep 17 00:00:00 2001 From: Colin McDonnell Date: Wed, 22 Mar 2023 15:01:01 -0700 Subject: 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 --- test/js/web/fetch/fetch-gzip.test.ts | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) (limited to 'test/js/web/fetch/fetch-gzip.test.ts') 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((resolve, reject) => { if (cork) { corked.push(chunk); -- cgit v1.2.3