Skip to content

Commit

Permalink
Update dev deps. Fix couple lint issues. Add node v6 and remove 0.10 …
Browse files Browse the repository at this point in the history
…for travis tests.
  • Loading branch information
mikelax committed Oct 19, 2016
1 parent 2026549 commit 6fcd9b3
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 18 deletions.
1 change: 1 addition & 0 deletions .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
"no-proto": [1],
"no-shadow": [1],
"no-use-before-define": [2, "nofunc"],
"no-underscore-dangle": [0],

// IMHO, more sensible overrides to existing airbnb error definitions
"max-len": [2, 100, 4, {"ignoreComments": true, "ignoreUrls": true}],
Expand Down
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
language: node_js
node_js:
- "6"
- "5"
- "4"
- "0.12"
- "0.10"
24 changes: 11 additions & 13 deletions lib/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ Test.prototype.assert = function(resError, res, fn) {
}

// asserts
for (i = 0; i < this._asserts.length && !error; ++i) {
for (i = 0; i < this._asserts.length && !error; i += 1) {
error = this._assertFunction(this._asserts[i], res);
}

Expand Down Expand Up @@ -202,20 +202,18 @@ Test.prototype._assertBody = function(body, res) {
b = util.inspect(res.body);
return error('expected ' + a + ' response body, got ' + b, body, res.body);
}
} else {
} else if (body !== res.text) {
// string
if (body !== res.text) {
a = util.inspect(body);
b = util.inspect(res.text);

// regexp
if (isregexp) {
if (!body.test(res.text)) {
return error('expected body ' + b + ' to match ' + body, body, res.body);
}
} else {
return error('expected ' + a + ' response body, got ' + b, body, res.body);
a = util.inspect(body);
b = util.inspect(res.text);

// regexp
if (isregexp) {
if (!body.test(res.text)) {
return error('expected body ' + b + ' to match ' + body, body, res.body);
}
} else {
return error('expected ' + a + ' response body, got ' + b, body, res.body);
}
}
};
Expand Down
11 changes: 7 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,14 @@
"devDependencies": {
"body-parser": "~1.15.0",
"cookie-parser": "~1.4.1",
"eslint": "^2.8.0",
"eslint-config-airbnb": "^7.0.0",
"eslint": "^3.8.1",
"eslint-config-airbnb": "^12.0.0",
"eslint-plugin-import": "1.16.0",
"eslint-plugin-jsx-a11y": "2.2.3",
"eslint-plugin-react": "6.4.1",
"express": "~4.14.0",
"mocha": "~2.5.3",
"should": "~10.0.0"
"mocha": "~3.1.2",
"should": "~11.1.1"
},
"engines": {
"node": ">=0.10.0"
Expand Down

0 comments on commit 6fcd9b3

Please sign in to comment.