Skip to content
Permalink
Browse files
fix: handle callexpressions with anonymous calles
  • Loading branch information
SimenB committed May 27, 2018
1 parent 7707e14 commit 885ce1798d9b0bd5b6685675f8456062d34fc551
Showing with 5 additions and 0 deletions.
  1. +1 −0 rules/__tests__/no-jasmine-globals.test.js
  2. +4 −0 rules/no-jasmine-globals.js
@@ -14,6 +14,7 @@ ruleTester.run('no-jasmine-globals', rule, {
'it("foo", function () {})',
'test("foo", function () {})',
'foo()',
`require('foo')('bar')`,
],
invalid: [
{
@@ -15,6 +15,10 @@ module.exports = {
CallExpression(node) {
const calleeName = getNodeName(node.callee);

if (!calleeName) {
return;
}

if (calleeName === 'spyOn' || calleeName === 'spyOnProperty') {
context.report({
node,

0 comments on commit 885ce17

Please sign in to comment.