From 32684e70e664f6a365bc9acc8c0d94d4735fc4f0 Mon Sep 17 00:00:00 2001 From: Kit Langton Date: Sat, 9 May 2026 08:50:00 -0400 Subject: [PATCH] test(server): expect null body from HTTP API authorize() with no redirect (#26515) --- packages/opencode/test/server/httpapi-provider.test.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/packages/opencode/test/server/httpapi-provider.test.ts b/packages/opencode/test/server/httpapi-provider.test.ts index c45a81838a..fa32608fc8 100644 --- a/packages/opencode/test/server/httpapi-provider.test.ts +++ b/packages/opencode/test/server/httpapi-provider.test.ts @@ -128,7 +128,12 @@ describe("provider HttpApi", () => { headers, }) expect(apiLegacy).toEqual({ status: 200, body: "" }) - expect(apiHttpApi).toEqual(apiLegacy) + // #26474 changed the HTTP API authorize handler to serialize an + // undefined service result as JSON `null` instead of an empty body + // so clients can `.json()` parse the response uniformly. The legacy + // Hono path still emits an empty body (`c.json(undefined)`); the new + // backend's body diverges intentionally. + expect(apiHttpApi).toEqual({ status: 200, body: "null" }) const oauthLegacy = yield* requestAuthorize({ app: legacy,