import { render, screen } from "@testing-library/react";

import { Toast } from "./toast";
import { ToastProvider } from "./toast-provider";

describe("Toast", () => {
  it("should display title and description", async () => {
    render(
      <ToastProvider>
        <Toast id={1} title="mock toast" description="mock description" closeLabel="mock altText" />
      </ToastProvider>
    );

    expect(await screen.findByText("mock toast")).toBeInTheDocument();
    expect(await screen.findByText("mock description")).toBeInTheDocument();
  });
});
