import { render } from "@testing-library/react-native";
import { ScreenContext, ScreenContextProvider, withScreenContext } from "../";
import React from "react";

describe("ScreenContext", () => {
  describe("ScreneContext context", () => {
    it("should return the context", () => {
      expect(ScreenContext).toBeDefined();
    });
  });

  describe("ScreenContextProvider", () => {
    it("should return the provider", () => {
      expect(ScreenContextProvider).toBeDefined();
    });
  });

  describe("withScreenContext", () => {
    it("should return the context", () => {
      const Component = () => null;
      const WrappedComponent = withScreenContext(Component);
      const { toJSON } = render(<WrappedComponent />);

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