Skip to content

Commit 32684e7

Browse files
authored
test(server): expect null body from HTTP API authorize() with no redirect (#26515)
1 parent b2baddc commit 32684e7

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

packages/opencode/test/server/httpapi-provider.test.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,12 @@ describe("provider HttpApi", () => {
128128
headers,
129129
})
130130
expect(apiLegacy).toEqual({ status: 200, body: "" })
131-
expect(apiHttpApi).toEqual(apiLegacy)
131+
// #26474 changed the HTTP API authorize handler to serialize an
132+
// undefined service result as JSON `null` instead of an empty body
133+
// so clients can `.json()` parse the response uniformly. The legacy
134+
// Hono path still emits an empty body (`c.json(undefined)`); the new
135+
// backend's body diverges intentionally.
136+
expect(apiHttpApi).toEqual({ status: 200, body: "null" })
132137

133138
const oauthLegacy = yield* requestAuthorize({
134139
app: legacy,

0 commit comments

Comments
 (0)