Import tests: tests/unit/resource-meter
Import the existing local project snapshot. This commit organizes existing files; it does not represent newly developed functionality.
This commit is contained in:
@@ -0,0 +1,24 @@
|
||||
import { render, screen } from "@testing-library/react";
|
||||
import { describe, expect, it } from "vitest";
|
||||
import { ResourceMeter } from "@/components/common/resource-meter";
|
||||
|
||||
describe("ResourceMeter", () => {
|
||||
it("renders usage labels and status", () => {
|
||||
render(
|
||||
<ResourceMeter
|
||||
resource={{
|
||||
key: "disk",
|
||||
label: "Disk usage",
|
||||
used: 40,
|
||||
limit: 100,
|
||||
unit: "GB",
|
||||
status: "healthy",
|
||||
}}
|
||||
/>,
|
||||
);
|
||||
|
||||
expect(screen.getByText("Disk usage")).toBeInTheDocument();
|
||||
expect(screen.getByText("40 GB")).toBeInTheDocument();
|
||||
expect(screen.getByText("healthy")).toBeInTheDocument();
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user