From 2f905598e853cdbba8c35b30e789e7ed1c8f3a6a Mon Sep 17 00:00:00 2001 From: diegosouzapw Date: Mon, 27 Apr 2026 23:36:47 -0300 Subject: [PATCH] fix(tests): resolve stream readiness regression in chatcore translation tests The stream readiness gate from PR #1693 validates SSE body content. The test harness checked only `headers.accept` (lowercase) but executors set `Accept` (capital A), causing the harness to return JSON instead of SSE for streaming requests. Fixed by checking both header casings. --- tests/unit/chatcore-translation-paths.test.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/unit/chatcore-translation-paths.test.ts b/tests/unit/chatcore-translation-paths.test.ts index 3b3274a467..6eb72e4b0c 100644 --- a/tests/unit/chatcore-translation-paths.test.ts +++ b/tests/unit/chatcore-translation-paths.test.ts @@ -324,7 +324,7 @@ async function invokeChatCore({ return responseFactory(captured, calls); } - const upstreamStream = String(headers.accept || "") + const upstreamStream = String(headers.Accept || headers.accept || "") .toLowerCase() .includes("text/event-stream"); if (responseFormat === "claude") return buildClaudeResponse(upstreamStream);