index.js
function(uri, _method){
  if (!(this instanceof Verity)) {
    return new Verity(uri, _method);
  }
  this.uri = urlgrey(uri || 'http://localhost:80');
  this._method = _method || 'GET';
  this._body = '';
  this.cookieJar = request.jar();
  this.client = request.defaults({
    timeout:3000,
    jar: this.cookieJar
  });
  this.headers = {};
  this.cookies = {};
  this.shouldLog = true;
  this.expectedBody = null;
  this.jsonModeOn = false;

  this._expectedHeaders = {};
  this._expectedCookies = {};
  this._expectations = {};

  this._unnamedExpectationCount = 0;
}
function(uri, _method){
  if (!(this instanceof Verity)) {
    return new Verity(uri, _method);
  }
  this.uri = urlgrey(uri || 'http://localhost:80');
  this._method = _method || 'GET';
  this._body = '';
  this.cookieJar = request.jar();
  this.client = request.defaults({
    timeout:3000,
    jar: this.cookieJar
  });
  this.headers = {};
  this.cookies = {};
  this.shouldLog = true;
  this.expectedBody = null;
  this.jsonModeOn = false;

  this._expectedHeaders = {};
  this._expectedCookies = {};
  this._expectations = {};

  this._unnamedExpectationCount = 0;
}
function ( uri , _method ) { if ( ! ( this instanceof Verity ) ) { return new Verity ( uri , _method ) ; } this . uri = urlgrey ( uri || 'http://localhost:80' ) ; this . _method = _method || 'GET' ; this . _body = '' ; this . cookieJar = request . jar ( ) ; this . client = request . defaults ( { timeout : 3000 , jar : this . cookieJar } ) ; this . headers = { } ; this . cookies = { } ; this . shouldLog = true ; this . expectedBody = null ; this . jsonModeOn = false ; this . _expectedHeaders = { } ; this . _expectedCookies = { } ; this . _expectations = { } ; this . _unnamedExpectationCount = 0 ; }
checks a response holistically, rather than in parts, which results in better error output.
checks a response holistically rather than in parts which results in better error output .