Skip to content

A full-featured CRM built with React, shadcn/ui, and Supabase.

mock console.error in test logging error

ThieryMichel76b8166ab9b5
diff --git a/src/components/atomic-crm/contacts/ContactList.test.tsx b/src/components/atomic-crm/contacts/ContactList.test.tsx
index 6441bbdf..f92e8d08 100644
--- a/src/components/atomic-crm/contacts/ContactList.test.tsx
+++ b/src/components/atomic-crm/contacts/ContactList.test.tsx
@@ -41,11 +41,13 @@ describe("ContactList", () => {
});
it("renders an error notification when loading contacts fails", async () => {
+ vi.spyOn(console, "error").mockImplementation(() => {});
const screen = await render(<DesktopError />);
await expect
.element(screen.getByText("Error loading contacts"))
.toBeVisible();
+ vi.restoreAllMocks();
});
it("shows the bulk tag button only after selecting contacts", async () => {