See the issue and the test case with original fix in https://github.com/facebook/react/pull/14802.

We'll need to fix it properly, see https://github.com/facebook/react/pull/14802#issuecomment-463277621.
return <div>foo</div>;
    }
    const MemoFoo = React.memo(Foo);
    const shallowRenderer = createRenderer();
    shallowRenderer.render(<MemoFoo />);
  });
  it('should enable React.memo to prevent a re-render', () => {
    const logs = [];
    const Foo = React.memo(({count}) => {
      logs.push(`Foo: ${count}`);
      return <div>{count}</div>;
    });
    const Bar = React.memo(({count}) => {
      logs.push(`Bar: ${count}`);
      return <div>{count}</div>;
    });
    const shallowRenderer = createRenderer();
    shallowRenderer.render(<Foo count={1} />);
    expect(logs).toEqual(['Foo: 1']);
    logs.length = 0;
    
    shallowRenderer.render(<Foo count={1} />);
    expect(logs).toEqual([]);
    
    shallowRenderer.render(<Bar count={1} />);
    expect(logs).toEqual(['Bar: 1']);
  });
  it('should respect a custom comparison function with React.memo', () => {
    let renderCount = 0;
    function areEqual(props, nextProps) {