Files
contact-tools/tests/components/app.test.tsx
T
zemion eb7ff7ae8f
Verify / verify (push) Canceled after 0s
Release Contact Tools 0.2.0
2026-09-02 11:45:06 +02:00

23 lines
786 B
TypeScript

import { render, screen } from "@testing-library/react";
import userEvent from "@testing-library/user-event";
import { describe, expect, it, vi } from "vitest";
import { App } from "../../src/App";
describe("Contact Tools", () => {
it("renders the local workbench and exposes duplicate reasons", async () => {
vi.stubGlobal(
"fetch",
vi.fn(async () => new Response("Not found", { status: 404 })),
);
render(<App />);
expect(
await screen.findByRole("heading", { name: "Contact Tools" }),
).toBeVisible();
await userEvent.click(
await screen.findByRole("button", { name: "Duplicates" }),
);
expect(screen.getByText(/same normalized email/u)).toBeVisible();
expect(screen.getByText("Browser-local")).toBeVisible();
});
});