code: function verify(expected, actual, matchingRules, comment){
  
      var errors = [];
  
      errors.push(checkMethod(expected.method, actual.method));
      errors.push(checkPath(expected.path, actual.path));
      errors.push(checkQuery(expected.query, actual.query));
      errors.push(checkBody(expected.body, actual.body, matchingRules));
      errors.push(checkHeaders(expected.headers, actual.headers, matchingRules));
  
      //Clean out the 'undefined' from the array leaving only valid errors
      errors = errors.filter(function(e){
          return !!e;
      });
  
      errors.forEach(function(e){
          var message = comment ? comment + " - " + e.error : e.error;
          throw new AssertionError(message, {
              expected: e.expected,
              actual: e.actual,
              showDiff: true
          });
      });
  
      //All good, pass on the expectations so they may be published
      return expected;
  }
docs: Public API:
  Main consumer pact verification entrypoint. Given a set of expectations it will either return
  the verified object or throw.
  
  @param {Object} expected The expected request. Object must include method, path, query,
  headers and body elements as per https://github.com/pact-foundation/pact-specification/blob/version-2/testcases/request/body/matches.json
  @param {Object} actual Similarly, the actual request.
  @param {object} matchingRules Optional, The v2 specification of extended matching rules such as type, regex and min/max requirements.
  @param {String} comment Optional, A note about the test, used for identifying what's failing
  @return {Object} return verified object if no assertions fail. Throws in the event of an assertion failure.