mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-12 19:00:43 +00:00
test: clarify feishu streaming status assertions
This commit is contained in:
@@ -1138,7 +1138,7 @@ describe("createFeishuReplyDispatcher streaming behavior", () => {
|
||||
const updateTexts = streamingInstances[0].update.mock.calls.map((call: unknown[]) =>
|
||||
typeof call[0] === "string" ? call[0] : "",
|
||||
);
|
||||
expect(updateTexts.some((text) => text.includes("🔎 Web Search"))).toBe(true);
|
||||
expect(updateTexts).toEqual(expect.arrayContaining([expect.stringContaining("🔎 Web Search")]));
|
||||
expect(streamingInstances[0].close).toHaveBeenCalledWith("final answer", {
|
||||
note: "Agent: agent",
|
||||
});
|
||||
@@ -1171,9 +1171,11 @@ describe("createFeishuReplyDispatcher streaming behavior", () => {
|
||||
const updateTexts = streamingInstances[0].update.mock.calls.map((call: unknown[]) =>
|
||||
typeof call[0] === "string" ? call[0] : "",
|
||||
);
|
||||
expect(
|
||||
updateTexts.some((text) => text.includes("🛠️ Exec: run tests, `pnpm test -- --watch=false`")),
|
||||
).toBe(true);
|
||||
expect(updateTexts).toEqual(
|
||||
expect.arrayContaining([
|
||||
expect.stringContaining("🛠️ Exec: run tests, `pnpm test -- --watch=false`"),
|
||||
]),
|
||||
);
|
||||
});
|
||||
|
||||
it("omits message-like tools from streaming card status", async () => {
|
||||
@@ -1199,7 +1201,7 @@ describe("createFeishuReplyDispatcher streaming behavior", () => {
|
||||
const updateTexts = streamingInstances[0].update.mock.calls.map((call: unknown[]) =>
|
||||
typeof call[0] === "string" ? call[0] : "",
|
||||
);
|
||||
expect(updateTexts.some((text) => text.includes("Message"))).toBe(false);
|
||||
expect(updateTexts).not.toEqual(expect.arrayContaining([expect.stringContaining("Message")]));
|
||||
});
|
||||
|
||||
it("does not suppress a later final after error closeout", async () => {
|
||||
|
||||
Reference in New Issue
Block a user