const Relay = jest.genMockFromModule('react-relay');

class Mutation extends Relay.Mutation {
  _resolveProps(props) {
    this.props = props;
  }
}

class MockStore {
  reset() {
    this.successResponse = undefined;
  }

  succeedWith(response) {
    this.reset();
    this.successResponse = response;
  }

  failWith(response) {
    this.reset();
    this.failureResponse = response;
  }

  update(callbacks) {
    if (this.successResponse) {
      callbacks.onSuccess(this.successResponse);
    } else if (this.failureResponse) {
      callbacks.onFailure(this.failureResponse);
    }
    this.reset();
  }

  commitUpdate(mutation, callbacks) {
    return this.update(callbacks);
  }

  applyUpdate(mutation, callbacks) {
    return this.update(callbacks);
  }
}

module.exports = {
  QL: Relay.QL,
  Mutation,
  Route: Relay.Route,
  RootContainer: () => null,
  createContainer: (component) => component,
  Store: new MockStore(),
};

@@ -51,104 +51,8 @@
 );%0A%0A
-class Mutation extends Relay.Mutation %7B%0A  _resolveProps(props) %7B%0A    this.props = props;%0A  %7D%0A%7D%0A%0A
 clas
@@ -703,16 +703,32 @@
 y.QL,%0A  
+Mutation: Relay.
 Mutation

Remove Mutation mock, which breaks in node 6.11.1