import { render, screen } from "@testing-library/react";
import { expect, test } from "vitest";
import { MetricCard } from "./MetricCard.jsx";

test("renders a down arrow when delta text is negative", () => {
  render(<MetricCard item={{ caption: "与昨日相比", delta: "-39.27%", label: "活跃用户", value: "116" }} />);

  expect(screen.getByText("↓ 39.27%")).toBeInTheDocument();
});

