import * as React from "react";
import { View } from "react-native";
import { render } from "@testing-library/react-native";

import { LayoutContainer } from "../LayoutContainer";

describe("LayoutContainer", () => {
  const TestComp = () => <View testID="test-component" />;

  it("renders", () => {
    const { toJSON } = render(
      <LayoutContainer>
        <TestComp />
      </LayoutContainer>
    );

    expect(toJSON()).toMatchSnapshot();
  });

  it("renders passed component", () => {
    const { getByTestId } = render(
      <LayoutContainer>
        <TestComp />
      </LayoutContainer>
    );

    expect(getByTestId("test-component")).toBeDefined();
  });
});
