/**
 * 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 Flag from "../Flag";

describe("Flag", () => {
  describe("can render a flag", () => {
    it("works as expected", () => {
      expect(mount(<Flag countryCode="AU" />)).toMatchSnapshot();
    });
    it("can set a maxHeight", () => {
      const component = mount(<Flag countryCode="CA" maxWidth={64} />);

      expect(component.find("img").props().style).toEqual({
        height: "64px",
        maxWidth: "64px",
        width: "64px !important",
      });
      expect(component).toMatchSnapshot();
    });
  });
});
