Skip to content

Commit 66a661b

Browse files
committed
Merge pull request #236 from tilmanpotthof/increase-coverage
Increase coverage
2 parents c2e1435 + 0442ca1 commit 66a661b

File tree

2 files changed

+7
-5
lines changed

2 files changed

+7
-5
lines changed

rules/on-watch.js

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -46,10 +46,6 @@ module.exports = function(context) {
4646
* argument of the string '$destroy'.
4747
*/
4848
function isFirstArgDestroy(node) {
49-
if (node.type !== 'CallExpression') {
50-
return false;
51-
}
52-
5349
var args = node.arguments;
5450

5551
return (args.length >= 1 &&

test/on-watch.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,13 @@ eslintTester.run('on-watch', rule, {
3030
'scope.$on()',
3131
'scope.$watch()',
3232
'$scope.$on()',
33-
'$scope.$watch()'
33+
'$scope.$watch()',
34+
35+
// false positive check
36+
'$on()',
37+
38+
// uncovered edgecase
39+
'$scope["$on"]()'
3440

3541
],
3642
invalid: [

0 commit comments

Comments
 (0)