From 72a81d672fd5505bfb5cd6597cb59e51f51c3c34 Mon Sep 17 00:00:00 2001 From: Cursor Agent Date: Mon, 31 Aug 2026 16:33:24 +0000 Subject: [PATCH] test: cover live chat endpoint classification Co-authored-by: Simon Shi --- src/__tests__/live-recorder.test.ts | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 src/__tests__/live-recorder.test.ts diff --git a/src/__tests__/live-recorder.test.ts b/src/__tests__/live-recorder.test.ts new file mode 100644 index 0000000..ea45d0f --- /dev/null +++ b/src/__tests__/live-recorder.test.ts @@ -0,0 +1,11 @@ +import { describe, expect, it } from "vitest"; +import { classify } from "../../scripts/live-fixture-recorder.js"; + +describe("live fixture recorder endpoint classification", () => { + it.each([ + "https://api3.qoder.sh/algo/api/v2/service/pro/sse/agent_chat_generation?FetchKeys=llm_model_result&AgentId=agent_common&Encode=1", + "https://gateway.qoder.com.cn/algo/api/v2/service/pro/sse/agent_chat_generation?FetchKeys=llm_model_result&AgentId=agent_common&Encode=1", + ])("classifies the live %s endpoint as chat", (url) => { + expect(classify(url)).toBe("chat"); + }); +});