It is a Jest-ism that shouldn't be in our open source package.
People using Jest can implement a similar pattern directly.
render() {
        throw new Error('Should not get here.');
      }
    }
    
    MockedComponent.prototype.render = jest.fn();
    
    ReactTestUtils.mockComponent(MockedComponent);
    const container = document.createElement('div');
    ReactDOM.render(<MockedComponent>Hello</MockedComponent>, container);
    expect(container.textContent).toBe('Hello');
  });
  it('can scryRenderedComponentsWithType', () => {
    class Child extends React.Component {