/**
 * 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 {mount} from "enzyme";

import CarrierLogo from "../CarrierLogo";

describe("CarrierLogo", () => {
  describe("can render a carrier logo", () => {
    it("works as expected", () => {
      expect(mount(<CarrierLogo mode="ocean" code="MSCU" />)).toMatchSnapshot();
    });

    it("can set a maxWidth", () => {
      const component = mount(
        <CarrierLogo mode="air" code="LH" maxWidth={64} />
      );
      expect(component.find("img").props().style).toEqual({
        height: "64px",
        maxWidth: "64px",
        width: "64px !important",
      });
      expect(component).toMatchSnapshot();
    });
  });
});
