Same as https://github.com/facebook/react/issues/10103, but for the server renderer. You can look at implementation in https://github.com/facebook/react/pull/11168 and do something very similar in `ReactPartialRenderer.js`.
componentWillUnmount() {
        app.setState({});
        count++;
        throw Error('always fails');
      }
      render() {
        return <div>Hello {this.props.name}</div>;
      }
    }
    const container = document.createElement('div');
    const setRef = ref => {
      if (ref) {
        app = ref;
      }
    };
    expect(() => {
      ReactDOM.render(<App ref={setRef} stage={1} />, container);
      ReactDOM.render(<App ref={setRef} stage={2} />, container);
    }).toThrow();
    expect(count).toBe(1);
  });
  it('prepares new child before unmounting old', () => {
    const log = [];
    class Spy extends React.Component {