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`.
let ReactDOM;
let ReactDOMServer;
let ReactCurrentOwner;
let ReactTestUtils;
let PropTypes;
let shallowEqual;
let shallowCompare;
describe('ReactCompositeComponent', () => {
  beforeEach(() => {
    jest.resetModules();
    React = require('react');
    ReactDOM = require('react-dom');
    ReactDOMServer = require('react-dom/server');
    ReactCurrentOwner = require('react')
      .__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner;
    ReactTestUtils = require('react-dom/test-utils');
    PropTypes = require('prop-types');
    shallowEqual = require('fbjs/lib/shallowEqual');
    shallowCompare = function(instance, nextProps, nextState) {
      return (
        !shallowEqual(instance.props, nextProps) ||
        !shallowEqual(instance.state, nextState)
      );
    };
    MorphingComponent = class extends React.Component {
      state = {activated: false};
      _toggleActivatedState = () => {
        this.setState({activated: !this.state.activated});
      };
      render() {