import React, { useContext } from "react"; import { render } from "@test"; import { IComponentsContext } from "src/interfaces"; import { ComponentsContext, ComponentsContextProvider } from "."; describe("ComponentsContext", () => { const TestComponent = () => { const { components } = useContext(ComponentsContext); return <>{components}; }; it("should get value from ComponentsContext ", () => { const testContent = "Deneme"; const { getByText } = render( {testContent}

}>
, ); expect(getByText(testContent)); }); });