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`.
getChildContext() {
          return {
            text: 'hello, world',
          };
        }
        render() {
          return this.props.children;
        }
      }
      ContextProvider.childContextTypes = {
        text: PropTypes.string,
      };
      const markup = ReactDOMServer.renderToString(
        <ContextProvider>
          <Component />
        </ContextProvider>,
      );
      expect(markup).toContain('hello, world');
    });
    it('renders components with different batching strategies', () => {
      class StaticComponent extends React.Component {