Comparing version 5.0.0-0 to 5.0.0-1
@@ -150,3 +150,3 @@ 'use strict'; | ||
Test.prototype.assert = function(resError, res, fn) { | ||
var error; | ||
var errorObj; | ||
var i; | ||
@@ -168,5 +168,5 @@ | ||
&& Object.getOwnPropertyNames(sysErrors).indexOf(resError.code) >= 0) { | ||
error = new Error(resError.code + ': ' + sysErrors[resError.code]); | ||
errorObj = new Error(resError.code + ': ' + sysErrors[resError.code]); | ||
} else { | ||
error = resError; | ||
errorObj = resError; | ||
} | ||
@@ -176,12 +176,12 @@ } | ||
// asserts | ||
for (i = 0; i < this._asserts.length && !error; i += 1) { | ||
error = this._assertFunction(this._asserts[i], res); | ||
for (i = 0; i < this._asserts.length && !errorObj; i += 1) { | ||
errorObj = this._assertFunction(this._asserts[i], res); | ||
} | ||
// set unexpected superagent error if no other error has occurred. | ||
if (!error && resError instanceof Error && (!res || resError.status !== res.status)) { | ||
error = resError; | ||
if (!errorObj && resError instanceof Error && (!res || resError.status !== res.status)) { | ||
errorObj = resError; | ||
} | ||
fn.call(this, error || null, res); | ||
fn.call(this, errorObj || null, res); | ||
}; | ||
@@ -188,0 +188,0 @@ |
{ | ||
"name": "supertest", | ||
"version": "5.0.0-0", | ||
"version": "5.0.0-1", | ||
"description": "SuperAgent driven library for testing HTTP servers", | ||
@@ -36,17 +36,17 @@ "main": "index.js", | ||
"methods": "1.1.2", | ||
"superagent": "5.1.0" | ||
"superagent": "6.1.0" | ||
}, | ||
"devDependencies": { | ||
"body-parser": "1.19.0", | ||
"cookie-parser": "1.4.4", | ||
"coveralls": "3.0.6", | ||
"eslint": "6.5.1", | ||
"eslint-config-airbnb-base": "14.0.0", | ||
"eslint-plugin-import": "2.18.2", | ||
"cookie-parser": "1.4.5", | ||
"coveralls": "3.1.0", | ||
"eslint": "7.9.0", | ||
"eslint-config-airbnb-base": "14.2.0", | ||
"eslint-plugin-import": "2.22.0", | ||
"express": "4.17.1", | ||
"mocha": "6.2.1", | ||
"nock": "11.3.5", | ||
"nyc": "14.1.1", | ||
"mocha": "8.1.3", | ||
"nock": "13.0.4", | ||
"nyc": "15.1.0", | ||
"should": "13.2.3" | ||
} | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
19890
+ Addedform-data@3.0.2(transitive)
+ Addedsemver@7.6.3(transitive)
+ Addedsuperagent@6.1.0(transitive)
- Removedform-data@2.5.2(transitive)
- Removedsemver@6.3.1(transitive)
- Removedsuperagent@5.1.0(transitive)
Updatedsuperagent@6.1.0