lib/rules/valid-locator-type.js
function isArgumentByLocator (node) {
  if (node.arguments && node.arguments.length && node.arguments[0].type === 'CallExpression') {
    var argument = node.arguments[0]
    if (argument.callee && argument.callee.object && argument.callee.object.name === 'by') {
      return true
    }
  }
  return false
}
function isArgumentByLocator (node) {
  if (node.arguments && node.arguments.length && node.arguments[0].type === 'CallExpression') {
    var argument = node.arguments[0]
    if (argument.callee && argument.callee.object && argument.callee.object.name === 'by') {
      return true
    }
  }
  return false
}
function isArgumentByLocator ( node ) { if ( node . arguments && node . arguments . length && node . arguments [ 0 ] . type === 'CallExpression' ) { var argument = node . arguments [ 0 ] if ( argument . callee && argument . callee . object && argument . callee . object . name === 'by' ) { return true } } return false }
Checks if a given CallExpression node has the argument the "by" expression

@param {ASTNode} node - A node to check.
@returns {boolean}
Checks if a given CallExpression node has the argument the by expression