Skip to content

Commit f503048

Browse files
authoredSep 25, 2020
Merge pull request #671 from galuszkak/feature/upgrade-packages
chore: upgrade packages and adjust tests
2 parents 910a111 + 25dcfa7 commit f503048

File tree

5 files changed

+1858
-1249
lines changed

5 files changed

+1858
-1249
lines changed
 

‎.eslintrc

-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414
"consistent-return": [0],
1515

1616
// Disabled but may want to refactor code eventually
17-
"no-shadow": [1],
1817
"no-use-before-define": [2, "nofunc"],
1918
"no-underscore-dangle": [0],
2019

‎lib/test.js

+8-8
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ Test.prototype.end = function(fn) {
147147
*/
148148

149149
Test.prototype.assert = function(resError, res, fn) {
150-
var error;
150+
var errorObj;
151151
var i;
152152

153153
// check for unexpected network errors or server not running/reachable errors
@@ -164,23 +164,23 @@ Test.prototype.assert = function(resError, res, fn) {
164164
if (!res && resError) {
165165
if (resError instanceof Error && resError.syscall === 'connect'
166166
&& Object.getOwnPropertyNames(sysErrors).indexOf(resError.code) >= 0) {
167-
error = new Error(resError.code + ': ' + sysErrors[resError.code]);
167+
errorObj = new Error(resError.code + ': ' + sysErrors[resError.code]);
168168
} else {
169-
error = resError;
169+
errorObj = resError;
170170
}
171171
}
172172

173173
// asserts
174-
for (i = 0; i < this._asserts.length && !error; i += 1) {
175-
error = this._assertFunction(this._asserts[i], res);
174+
for (i = 0; i < this._asserts.length && !errorObj; i += 1) {
175+
errorObj = this._assertFunction(this._asserts[i], res);
176176
}
177177

178178
// set unexpected superagent error if no other error has occurred.
179-
if (!error && resError instanceof Error && (!res || resError.status !== res.status)) {
180-
error = resError;
179+
if (!errorObj && resError instanceof Error && (!res || resError.status !== res.status)) {
180+
errorObj = resError;
181181
}
182182

183-
fn.call(this, error || null, res);
183+
fn.call(this, errorObj || null, res);
184184
};
185185

186186
/**

‎package-lock.json

+1,840-1,230
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎package.json

+9-9
Original file line numberDiff line numberDiff line change
@@ -33,19 +33,19 @@
3333
},
3434
"dependencies": {
3535
"methods": "1.1.2",
36-
"superagent": "5.1.0"
36+
"superagent": "6.1.0"
3737
},
3838
"devDependencies": {
3939
"body-parser": "1.19.0",
40-
"cookie-parser": "1.4.4",
41-
"coveralls": "3.0.6",
42-
"eslint": "6.5.1",
43-
"eslint-config-airbnb-base": "14.0.0",
44-
"eslint-plugin-import": "2.18.2",
40+
"cookie-parser": "1.4.5",
41+
"coveralls": "3.1.0",
42+
"eslint": "7.9.0",
43+
"eslint-config-airbnb-base": "14.2.0",
44+
"eslint-plugin-import": "2.22.0",
4545
"express": "4.17.1",
46-
"mocha": "6.2.1",
47-
"nock": "11.3.5",
48-
"nyc": "14.1.1",
46+
"mocha": "8.1.3",
47+
"nock": "13.0.4",
48+
"nyc": "15.1.0",
4949
"should": "13.2.3"
5050
}
5151
}

‎test/supertest.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -521,7 +521,7 @@ describe('request(app)', function () {
521521
.get('/')
522522
.expect({ stringValue: 'foo', numberValue: 3, nestedObject: { innerString: 5 } })
523523
.end(function (err, res) {
524-
err.message.should.equal('expected { stringValue: \'foo\',\n numberValue: 3,\n nestedObject: { innerString: 5 } } response body, got { stringValue: \'foo\',\n numberValue: 3,\n nestedObject: { innerString: \'5\' } }'); // eslint-disable-line max-len
524+
err.message.should.equal('expected {\n stringValue: \'foo\',\n numberValue: 3,\n nestedObject: { innerString: 5 }\n} response body, got {\n stringValue: \'foo\',\n numberValue: 3,\n nestedObject: { innerString: \'5\' }\n}'); // eslint-disable-line max-len
525525

526526
request(app)
527527
.get('/')

0 commit comments

Comments
 (0)
Please sign in to comment.