mirror of
https://github.com/openclaw/openclaw.git
synced 2026-04-03 03:03:24 -04:00
test: remove redundant line existence assertions
This commit is contained in:
@@ -16,7 +16,6 @@ describe("createInfoCard", () => {
|
||||
it("includes footer when provided", () => {
|
||||
const card = createInfoCard("Title", "Body", "Footer text");
|
||||
|
||||
expect(card.footer).toBeDefined();
|
||||
const footer = card.footer as { contents: Array<{ text: string }> };
|
||||
expect(footer.contents[0].text).toBe("Footer text");
|
||||
});
|
||||
@@ -89,7 +88,6 @@ describe("createActionCard", () => {
|
||||
imageUrl: "https://example.com/hero.jpg",
|
||||
});
|
||||
|
||||
expect(card.hero).toBeDefined();
|
||||
expect((card.hero as { url: string }).url).toBe("https://example.com/hero.jpg");
|
||||
});
|
||||
});
|
||||
@@ -122,7 +120,6 @@ describe("createMediaPlayerCard", () => {
|
||||
imageUrl: "https://example.com/album.jpg",
|
||||
});
|
||||
|
||||
expect(card.hero).toBeDefined();
|
||||
expect((card.hero as { url: string }).url).toBe("https://example.com/album.jpg");
|
||||
});
|
||||
});
|
||||
@@ -137,7 +134,6 @@ describe("createDeviceControlCard", () => {
|
||||
})),
|
||||
});
|
||||
|
||||
expect(card.footer).toBeDefined();
|
||||
// Should have max 3 rows of 2 buttons
|
||||
const footer = card.footer as { contents: unknown[] };
|
||||
expect(footer.contents.length).toBeLessThanOrEqual(3);
|
||||
|
||||
@@ -37,7 +37,6 @@ describe("createTextMessageWithQuickReplies", () => {
|
||||
|
||||
expect(message.type).toBe("text");
|
||||
expect(message.text).toBe("Choose an option:");
|
||||
expect(message.quickReply).toBeDefined();
|
||||
expect(message.quickReply.items).toHaveLength(2);
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user