UNPKG

eslint-plugin-chai-expect-keywords

Version:

ESLint plugin that checks for chai.js expect() assertions using non-existent keywords

13 lines (11 loc) 281 B
module.exports = function findExpectCall(node) { if (node.type === 'CallExpression' && node.callee.type === 'Identifier' && node.callee.name === 'expect' ) { return node; } if (node.type === 'MemberExpression') { return findExpectCall(node.object); } };