import { describe, it, expect } from "vitest"; import { renderWithProviders, screen } from "@/test/render"; import { EmptyState } from "./empty-state"; describe("EmptyState", () => { it("shows the default title and message", async () => { await renderWithProviders(, { waitForButton: false }); expect(await screen.findByText("No data")).toBeInTheDocument(); expect(screen.getByText(/no items to display/i)).toBeInTheDocument(); }); it("renders a custom title, message, and action", async () => { await renderWithProviders( Add} />, { waitForButton: false }, ); expect(await screen.findByText("Nothing here")).toBeInTheDocument(); expect(screen.getByText("Add one to start")).toBeInTheDocument(); expect(screen.getByRole("button", { name: "Add" })).toBeInTheDocument(); }); });