import React from "react"; import renderer from "react-test-renderer"; import Flex from "../Flex"; describe("Flex renders correctly", () => { it("with empty props", () => { const tree = renderer.create().toJSON(); expect(tree).toMatchSnapshot(); }); it("with data-testid", () => { const tree = renderer.create().toJSON(); expect(tree).toMatchSnapshot(); }); describe("Horizontal display", () => { it("with children", () => { const tree = renderer .create(
1
2
3
) .toJSON(); expect(tree).toMatchSnapshot(); }); it("with align", () => { const tree = renderer .create(
1
2
3
) .toJSON(); expect(tree).toMatchSnapshot(); }); it("with justify", () => { const tree = renderer .create(
1
2
3
) .toJSON(); expect(tree).toMatchSnapshot(); }); it("with align", () => { const tree = renderer .create(
1
2
3
) .toJSON(); expect(tree).toMatchSnapshot(); }); it("with gap", () => { const tree = renderer .create(
1
2
3
) .toJSON(); expect(tree).toMatchSnapshot(); }); it("with wrap", () => { const tree = renderer .create(
1
2
3
) .toJSON(); expect(tree).toMatchSnapshot(); }); }); describe("Vertical display", () => { it("with children", () => { const tree = renderer .create(
1
2
3
) .toJSON(); expect(tree).toMatchSnapshot(); }); it("with justify", () => { const tree = renderer .create(
1
2
3
) .toJSON(); expect(tree).toMatchSnapshot(); }); it("with align", () => { const tree = renderer .create(
1
2
3
) .toJSON(); expect(tree).toMatchSnapshot(); }); it("with wrap", () => { const tree = renderer .create(
1
2
3
) .toJSON(); expect(tree).toMatchSnapshot(); }); }); });