mirror of
https://github.com/openclaw/openclaw.git
synced 2026-04-21 14:11:26 +00:00
test: tighten shared card schema coverage
This commit is contained in:
@@ -576,17 +576,6 @@ describe("feishuPlugin actions", () => {
|
||||
).rejects.toThrow("Feishu thread-reply requires messageId.");
|
||||
});
|
||||
|
||||
it("declares card as optional in the tool schema", () => {
|
||||
const discovery = feishuPlugin.actions?.describeMessageTool?.({ cfg });
|
||||
const schema = Array.isArray(discovery?.schema) ? discovery.schema[0] : discovery?.schema;
|
||||
const cardSchema = schema?.properties?.card;
|
||||
expect(cardSchema).toBeDefined();
|
||||
// TypeBox marks Optional schemas with Symbol(TypeBox.Optional) = "Optional".
|
||||
expect(
|
||||
(cardSchema as unknown as Record<symbol, unknown>)?.[Symbol.for("TypeBox.Optional")],
|
||||
).toBe("Optional");
|
||||
});
|
||||
|
||||
it("sends media-only messages without requiring card", async () => {
|
||||
feishuOutboundSendMediaMock.mockResolvedValueOnce({
|
||||
channel: "feishu",
|
||||
|
||||
Reference in New Issue
Block a user