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`.
static contextTypes = {
        flag: PropTypes.bool,
      };
      render() {
        return <div />;
      }
    }
    class Wrapper extends React.Component {
      render() {
        return (
          <Parent ref="parent">
            <Child ref="child" />
          </Parent>
        );
      }
    }
    const wrapper = ReactTestUtils.renderIntoDocument(<Wrapper />);
    expect(wrapper.refs.parent.state.flag).toEqual(true);
    expect(wrapper.refs.child.context).toEqual({flag: true});
    
    wrapper.refs.parent.setState({flag: false});
    expect(wrapper.refs.parent.state.flag).toEqual(false);
    expect(wrapper.refs.child.context).toEqual({flag: false});
  });
  it('should pass context transitively', () => {
    let childInstance = null;
    let grandchildInstance = null;
    class Parent extends React.Component {