import { render, screen } from "@testing-library/react"; import { describe, expect, it } from "vitest"; import { Queue } from "./Queue"; describe("Queue", () => { it("shows the count and links every row to the work", () => { render( , ); expect(screen.getByText("Failed injections")).toBeInTheDocument(); expect(screen.getByText("2")).toBeInTheDocument(); expect(screen.getByRole("link", { name: "Acme Production" })).toHaveAttribute( "href", "/staff/instances/i1", ); }); it("says so plainly when there is nothing to do", () => { render(); expect(screen.getByText(/nothing to do/i)).toBeInTheDocument(); }); });