mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-10 19:04:58 +00:00
chore: Fix types in tests 44/N.
This commit is contained in:
@@ -33,7 +33,10 @@ describe("handleDiscordPresenceAction", () => {
|
||||
status: "online",
|
||||
afk: false,
|
||||
});
|
||||
const payload = JSON.parse(result.content[0].text ?? "");
|
||||
const textBlock = result.content.find((block) => block.type === "text");
|
||||
const payload = JSON.parse(
|
||||
(textBlock as { type: "text"; text: string } | undefined)?.text ?? "{}",
|
||||
);
|
||||
expect(payload.ok).toBe(true);
|
||||
expect(payload.activities[0]).toEqual({ type: 0, name: "with fire" });
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user