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`.
constructor() {
          super();
        }
        render() {
          return <div>{this.props.text}</div>;
        }
      }
      const markup = ReactDOMServer.renderToString(
        <Component text="hello, world" />,
      );
      expect(markup).toContain('hello, world');
    });
    it('renders with context when using custom constructor', () => {
      class Component extends React.Component {
        constructor() {
          super();
        }
        render() {
          return <div>{this.context.text}</div>;
        }
      }
      Component.contextTypes = {
        text: PropTypes.string.isRequired,
      };
      class ContextProvider extends React.Component {