import React from "react";
import { Text } from "react-native";
import { render } from "@testing-library/react-native";
import { withFocusableContext } from "../withFocusableContext";
import { FocusableGroupContext } from "../FocusableGroupContext";
const MockComponent = ({ groupId }: { groupId: string }) => (
);
const WrappedComponent = withFocusableContext(MockComponent);
describe("withFocusableContext HOC", () => {
it("should provide focusable context to the wrapped component", () => {
const { getByTestId } = render(, {
// eslint-disable-next-line react/display-name
wrapper: ({ children }: { children: React.ReactElement }) => (
{children}
),
});
expect(getByTestId("test")).toBeTruthy();
});
});