Full code here: https://gist.github.com/js08/0ec3d70dfda76d7e9fb4
Hi,
Possible solution that worked for me with jest
import React from "react";
import { shallow } from "enzyme";
import { Provider } from "react-redux";
import configureMockStore from "redux-mock-store";
import TestPage from "../TestPage";
const mockStore = configureMockStore();
const store = mockStore({});
describe("Testpage Component", () => {
it("should render without throwing an error", () => {
expect(
shallow(
).exists(Test page
)
).toBe(true);
});
});