import { render, screen } from "@solidjs/testing-library";
import { describe, expect, it } from "vitest";
import { Alert } from "../../../src/components/alert/index";
describe("Alert", () => {
it("has role=alert", () => {
render(() => Warning!);
expect(screen.getByRole("alert")).toBeTruthy();
});
it("renders children", () => {
render(() => Important message);
expect(screen.getByText("Important message")).toBeTruthy();
});
it("spreads props", () => {
render(() => (
Text
));
expect(screen.getByTestId("a").getAttribute("class")).toBe("custom");
});
});