import { MantineProvider } from "@mantine/core"; import { render, screen } from "@testing-library/react"; import { describe, expect, it } from "vitest"; import { BankSummaryView } from "./BankSummary.view"; const money = (value: string) => ({ currency: "RUB", value }); describe("BankSummaryView", () => { it("shows expenses, refunds, and net monthly totals", () => { render( , ); expect(screen.getAllByText("Расходы")).toHaveLength(2); expect(screen.getByText("Возвращено")).toBeInTheDocument(); expect(screen.getByText("После возвратов")).toBeInTheDocument(); expect(screen.getByText("1 000,00 ₽")).toBeInTheDocument(); expect(screen.getByText("200,00 ₽")).toBeInTheDocument(); expect(screen.getByText("800,00 ₽")).toBeInTheDocument(); }); });