Files
copenlight/src/modules/approval-requests/components/approval-request/clarification/tests/NewCommentIndicator.test.tsx
Ivan Carlos de Almeida 6fa41a771d
Some checks failed
Build, Push, Publish / Build & Release (push) Failing after 2s
Sync Repo / sync (push) Failing after 2s
first load
2025-12-16 04:40:00 -03:00

16 lines
635 B
TypeScript

import { screen } from "@testing-library/react";
import NewCommentIndicator from "../NewCommentIndicator";
import { renderWithTheme } from "../../../../testHelpers";
describe("NewCommentIndicator", () => {
it("renders singular new comment text when unreadCount is 1", () => {
renderWithTheme(<NewCommentIndicator unreadCount={1} />);
expect(screen.getByText("New comment")).toBeInTheDocument();
});
it("renders plural new comments text when unreadCount is greater than 1", () => {
renderWithTheme(<NewCommentIndicator unreadCount={5} />);
expect(screen.getByText("New comments")).toBeInTheDocument();
});
});