score:2

this is my generic hoc mock. i hope this is what you were looking for.

jest.mock("@hoc", () => {
  return {
    withhoc: () => {
      return (component) => {
        return (props) => {
          return <component newprop={jest.fn} {...props} />;
        };
      };
    },
  };
});

Related Query

More Query from same tag