Skip to content

Commit

Permalink
Bithound issues - linting
Browse files Browse the repository at this point in the history
Fix #13, #14, #15, #16
  • Loading branch information
arnaud-dezandee committed Apr 20, 2015
1 parent 5368eed commit 8ed0e00
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 6 deletions.
1 change: 1 addition & 0 deletions lib/driver/methods/button.js
Expand Up @@ -13,6 +13,7 @@ module.exports = function button(mixed, callback) {
[
function(cb) {
_this.elements(mixed, function(err, elements) {
if (err) { return cb(null); }
cb(null, elements);
});
},
Expand Down
5 changes: 3 additions & 2 deletions lib/driver/methods/elementsWithText.js
Expand Up @@ -14,8 +14,9 @@ module.exports = function elementsWithText(selector, text, callback) {
if (err) { return callback(err); }

function checkText(WebElement, cb) {
client.elementIdText(WebElement.ELEMENT, function (err, res) {
cb(res.value === text);
client.elementIdText(WebElement.ELEMENT, function (error, result) {
if (error) { return cb(false); }
cb(result.value === text);
});
}

Expand Down
5 changes: 3 additions & 2 deletions lib/driver/methods/elementsWithValue.js
Expand Up @@ -14,8 +14,9 @@ module.exports = function elementsWithValue(selector, value, callback) {
if (err) { return callback(err); }

function checkValue(WebElement, cb) {
client.elementIdAttribute(WebElement.ELEMENT, 'value', function(err, res) {
cb(res.value === value);
client.elementIdAttribute(WebElement.ELEMENT, 'value', function(error, result) {
if (error) { return cb(false); }
cb(result.value === value);
});
}

Expand Down
1 change: 1 addition & 0 deletions lib/driver/methods/link.js
Expand Up @@ -13,6 +13,7 @@ module.exports = function link(mixed, callback) {
[
function(cb) {
_this.elements(mixed, function(err, elements) {
if (err) { return cb(null); }
cb(null, elements);
});
},
Expand Down
4 changes: 2 additions & 2 deletions package.json
Expand Up @@ -39,13 +39,13 @@
"dependencies": {
"async": "^0.9.0",
"chai": "^2.2.0",
"lodash": "^3.6.0",
"lodash": "^3.7.0",
"webdriverio": "^2.4.5"
},
"devDependencies": {
"cucumber": "^0.4.8",
"gulp": "^3.8.11",
"gulp-eslint": "^0.8.0",
"gulp-eslint": "^0.9.0",
"hapi": "^8.4.0",
"istanbul": "^0.3.13",
"swig": "^1.4.2"
Expand Down

0 comments on commit 8ed0e00

Please sign in to comment.