A full-featured CRM built with React, shadcn/ui, and Supabase.
improvement
ThieryMichelb925a21a9045
diff --git a/src/components/atomic-crm/contacts/ContactList.test.tsx b/src/components/atomic-crm/contacts/ContactList.test.tsxindex f92e8d08..695c2412 100644--- a/src/components/atomic-crm/contacts/ContactList.test.tsx+++ b/src/components/atomic-crm/contacts/ContactList.test.tsx@@ -8,6 +8,10 @@ import {BulkTagButton,} from "./ContactList.stories";+afterEach(() => {+ vi.restoreAllMocks();+});+describe("ContactList", () => {it("renders an invite to create the first contact when the app is empty", async () => {const screen = await render(<DesktopEmpty />);@@ -47,7 +51,6 @@ describe("ContactList", () => {await expect.element(screen.getByText("Error loading contacts")).toBeVisible();- vi.restoreAllMocks();});it("shows the bulk tag button only after selecting contacts", async () => {diff --git a/supabase/functions/postmark/forwardedParser.test.ts b/supabase/functions/postmark/forwardedParser.test.tsindex c42296f9..09789668 100644--- a/supabase/functions/postmark/forwardedParser.test.ts+++ b/supabase/functions/postmark/forwardedParser.test.ts@@ -7,6 +7,10 @@ import {} from "./forwardedParser";describe("forwardedParser", () => {+ afterEach(() => {+ vi.restoreAllMocks();+ });+describe("stripForwardingHeaderBlock", () => {describe("returns original text when no forwarding separator is found", () => {it("returns the original text for plain content", () => {@@ -234,7 +238,6 @@ describe("forwardedParser", () => {vi.spyOn(console, "warn").mockImplementation(() => {});const subject = "Fwd: ";expect(stripSubjectForwardingPrefix(subject)).toBe(subject);- vi.restoreAllMocks();});});@@ -288,7 +291,6 @@ describe("forwardedParser", () => {// Both stripping operations would result in empty content, so original text should be returned.expect(getForwardedMailContent(text)).toBe(text.trim());- vi.restoreAllMocks();});it("handles text with no forwarding header and no signature", () => {