From b09121ac5238278a0dbf4906db7a2c8e86658289 Mon Sep 17 00:00:00 2001 From: Anthony Ettinger Date: Sat, 5 Sep 2026 21:45:34 +0000 Subject: [PATCH] Contract test awaits the now-async proxy Co-Authored-By: Claude Fable 5.1 Claude-Session: https://claude.ai/code/session_01YafYxayh7Gqe5MWNNQMev2 --- apps/logicsrc-web/contract/logicsrc-web.contract.test.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/apps/logicsrc-web/contract/logicsrc-web.contract.test.ts b/apps/logicsrc-web/contract/logicsrc-web.contract.test.ts index 849765f..7e20271 100644 --- a/apps/logicsrc-web/contract/logicsrc-web.contract.test.ts +++ b/apps/logicsrc-web/contract/logicsrc-web.contract.test.ts @@ -60,21 +60,21 @@ function jsonResponse(body: unknown, status = 200): Response { } describe("www canonical redirect (proxy.ts)", () => { - it("301s www to the apex host over https, preserving path + query", () => { + it("301s www to the apex host over https, preserving path + query", async () => { const request = new NextRequest("https://www.logicsrc.com/openspec?ref=email", { headers: { host: "www.logicsrc.com" } }); - const response = proxy(request); + const response = await proxy(request); expect(response.status).toBe(301); expect(response.headers.get("location")).toBe("https://logicsrc.com/openspec?ref=email"); }); - it("passes through apex requests untouched", () => { + it("passes through apex requests untouched", async () => { const request = new NextRequest("https://logicsrc.com/hire-us", { headers: { host: "logicsrc.com" } }); - const response = proxy(request); + const response = await proxy(request); // NextResponse.next() yields a non-redirect response. expect(response.status).toBe(200);