Skip to content

Commit

Permalink
fix(rules): fixed 'missing-wait-message' object and property check
Browse files Browse the repository at this point in the history
  • Loading branch information
alecxe committed Jan 31, 2016
1 parent 76ce2c2 commit 37c0ea1
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/rules/missing-wait-message.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@
module.exports = function (context) {
return {
'CallExpression': function (node) {
var objectName = node.callee.object.name
var propertyName = node.callee.property.name
var object = node.callee.object
var property = node.callee.property

if (propertyName === 'wait' && objectName === 'browser' && node.arguments.length < 3) {
if (object && property && property.name === 'wait' && object.name === 'browser' && node.arguments.length < 3) {
context.report(node, 'No timeout message provided for browser.wait()')
}
}
Expand Down

0 comments on commit 37c0ea1

Please sign in to comment.