import { describe, expect, it } from "vitest"; import { render, screen } from "@testing-library/react"; import { ModalPrices, ModalReviews } from "@/components/game-profile-sections"; import { getDictionary } from "@/lib/i18n/get-dictionary"; import type { GamePricePoint } from "@/lib/game/game-profile-types"; import { profileFixture } from "@/test/fixtures"; describe("ModalReviews", () => { it("renders nothing without review sources", () => { const dict = getDictionary("en"); const { container } = render( , ); expect(container.textContent).toBe(""); }); it("renders Steam review data", () => { const dict = getDictionary("en"); render( , ); expect(screen.getByText("Positive")).toBeDefined(); }); }); describe("ModalPrices", () => { it("renders the free badge", () => { const dict = getDictionary("en"); const bestPrice: GamePricePoint = { price: 0, regular: 0, currency: "USD", shop: "Steam", url: "", }; render( , ); expect(screen.getByText(dict.discord.gameModal.free)).toBeDefined(); }); });