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`.
return {
          depth: this.context.depth + 1,
        };
      }
      render() {
        childInstance = this;
        return <Grandchild />;
      }
    }
    class Grandchild extends React.Component {
      static contextTypes = {
        foo: PropTypes.string,
        depth: PropTypes.number,
      };
      render() {
        grandchildInstance = this;
        return <div />;
      }
    }
    ReactTestUtils.renderIntoDocument(<Parent />);
    expect(childInstance.context).toEqual({foo: 'bar', depth: 0});
    expect(grandchildInstance.context).toEqual({foo: 'bar', depth: 1});
  });
  it('should pass context when re-rendered', () => {
    let parentInstance = null;
    let childInstance = null;
    class Parent extends React.Component {