/**
 * TEAM: frontend_infra
 * @flow
 */

// TODO: Fix this eslint issue on next edit. This is an autogenerated comment.
// eslint-disable-next-line flexport/no-legacy-dependencies
import {shallow} from "enzyme";
import {DeprecatedToaster} from "../DeprecatedConnectedToaster";

describe("Toaster", () => {
  it("renders when empty", () => {
    expect(shallow(<DeprecatedToaster toasts={[]} />)).toMatchSnapshot();
  });

  it("renders when not empty", () => {
    const toasts = [
      {
        id: 0,
        message: "hello",
        intent: "success",
      },
      {
        id: 1,
        message: "hello",
        intent: "success",
      },
    ];
    expect(shallow(<DeprecatedToaster toasts={toasts} />)).toMatchSnapshot();
  });
});
