@@ -78,6 +78,16 @@ eslintTester.run('di-unused', rule, {
78
78
code : 'angular.module("").controller("", fn); function fn($q) {}' ,
79
79
errors : [ { message : 'Unused injected value $q' } ]
80
80
} ,
81
+ {
82
+ code : 'angular.module("").controller("", ["$q", ($q) => {}]);' ,
83
+ parserOptions : { ecmaVersion : 6 } ,
84
+ errors : [ { message : 'Unused injected value $q' } ]
85
+ } ,
86
+ {
87
+ code : 'angular.module("").controller("", ($q) => {});' ,
88
+ parserOptions : { ecmaVersion : 6 } ,
89
+ errors : [ { message : 'Unused injected value $q' } ]
90
+ } ,
81
91
// directive
82
92
{
83
93
code : 'angular.module("").directive("", function($q) {});' ,
@@ -96,9 +106,18 @@ eslintTester.run('di-unused', rule, {
96
106
{
97
107
code : 'angular.module("").factory("", function($q) {});' ,
98
108
errors : [ { message : 'Unused injected value $q' } ]
109
+ } ,
110
+ {
111
+ code : 'angular.module("").factory("", $q => {});' ,
112
+ errors : [ { message : 'Unused injected value $q' } ] ,
113
+ parserOptions : { ecmaVersion : 6 }
99
114
} , {
100
115
code : 'angular.module("").factory("", ["q", function($q) {}]);' ,
101
116
errors : [ { message : 'Unused injected value $q' } ]
117
+ } , {
118
+ code : 'angular.module("").factory("", ["q", $q => {}]);' ,
119
+ errors : [ { message : 'Unused injected value $q' } ] ,
120
+ parserOptions : { ecmaVersion : 6 }
102
121
} , {
103
122
code : 'var app = angular.module(""); app.factory("", function($q) {});' ,
104
123
errors : [ { message : 'Unused injected value $q' } ]
0 commit comments