diff --git a/test/typecheck-array.js b/test/typecheck-array.js index 4843bb40..7a504a11 100644 --- a/test/typecheck-array.js +++ b/test/typecheck-array.js @@ -19,6 +19,7 @@ eslintTester.run('typecheck-array', rule, { ].concat(commonFalsePositives), invalid: [ {code: 'Object.prototype.toString.call([]) === "[object Array]"', errors: [{message: 'You should use the angular.isArray method'}]}, + {code: 'function name(){return variable === "[object Array]";}', errors: [{message: 'You should use the angular.isArray method'}]}, {code: '"[object Array]" === Object.prototype.toString.call([])', errors: [{message: 'You should use the angular.isArray method'}]}, {code: 'variable === "[object Array]"', errors: [{message: 'You should use the angular.isArray method'}]}, {code: '"[object Array]" === variable', errors: [{message: 'You should use the angular.isArray method'}]}, diff --git a/test/typecheck-date.js b/test/typecheck-date.js index 7f1254b7..01e40aa2 100644 --- a/test/typecheck-date.js +++ b/test/typecheck-date.js @@ -19,6 +19,7 @@ eslintTester.run('typecheck-date', rule, { ].concat(commonFalsePositives), invalid: [ {code: 'Object.prototype.toString.call(variable) === "[object Date]"', errors: [{message: 'You should use the angular.isDate method'}]}, + {code: 'function name(){return variable === "[object Date]";}', errors: [{message: 'You should use the angular.isDate method'}]}, {code: '"[object Date]" === Object.prototype.toString.call(variable)', errors: [{message: 'You should use the angular.isDate method'}]}, {code: 'variable === "[object Date]"', errors: [{message: 'You should use the angular.isDate method'}]}, {code: '"[object Date]" === variable', errors: [{message: 'You should use the angular.isDate method'}]}, diff --git a/test/typecheck-function.js b/test/typecheck-function.js index 7e8c0933..dbe1b878 100644 --- a/test/typecheck-function.js +++ b/test/typecheck-function.js @@ -19,6 +19,7 @@ eslintTester.run('typecheck-function', rule, { ].concat(commonFalsePositives), invalid: [ {code: 'typeof variable === "function"', errors: [{message: 'You should use the angular.isFunction method'}]}, + {code: 'function name(){return variable === "function";}', errors: [{message: 'You should use the angular.isFunction method'}]}, {code: '"function" === typeof variable', errors: [{message: 'You should use the angular.isFunction method'}]}, {code: 'variable === "function"', errors: [{message: 'You should use the angular.isFunction method'}]}, {code: '"function" === variable', errors: [{message: 'You should use the angular.isFunction method'}]}, diff --git a/test/typecheck-number.js b/test/typecheck-number.js index 47a0a6a5..30391aa6 100644 --- a/test/typecheck-number.js +++ b/test/typecheck-number.js @@ -19,6 +19,7 @@ eslintTester.run('typecheck-number', rule, { ].concat(commonFalsePositives), invalid: [ {code: 'Object.prototype.toString.call(variable) === "[object Number]"', errors: [{message: 'You should use the angular.isNumber method'}]}, + {code: 'function name(){return variable === "[object Number]";}', errors: [{message: 'You should use the angular.isNumber method'}]}, {code: '"[object Number]" === Object.prototype.toString.call(variable)', errors: [{message: 'You should use the angular.isNumber method'}]}, {code: 'variable === "[object Number]"', errors: [{message: 'You should use the angular.isNumber method'}]}, {code: '"[object Number]" === variable', errors: [{message: 'You should use the angular.isNumber method'}]}, diff --git a/test/typecheck-object.js b/test/typecheck-object.js index 8ac13a9b..a78a0a65 100644 --- a/test/typecheck-object.js +++ b/test/typecheck-object.js @@ -19,6 +19,7 @@ eslintTester.run('typecheck-object', rule, { ].concat(commonFalsePositives), invalid: [ {code: 'typeof variable === "object"', errors: [{message: 'You should use the angular.isObject method'}]}, + {code: 'function name(){return variable === "object";}', errors: [{message: 'You should use the angular.isObject method'}]}, {code: '"object" === typeof variable', errors: [{message: 'You should use the angular.isObject method'}]}, {code: 'variable === "object"', errors: [{message: 'You should use the angular.isObject method'}]}, {code: '"object" === variable', errors: [{message: 'You should use the angular.isObject method'}]}, diff --git a/test/typecheck-string.js b/test/typecheck-string.js index a4e572d4..8f1832b8 100644 --- a/test/typecheck-string.js +++ b/test/typecheck-string.js @@ -19,6 +19,7 @@ eslintTester.run('typecheck-string', rule, { ].concat(commonFalsePositives), invalid: [ {code: 'Object.prototype.toString.call(variable) === "[object String]"', errors: [{message: 'You should use the angular.isString method'}]}, + {code: 'function name(){return variable === "[object String]";}', errors: [{message: 'You should use the angular.isString method'}]}, {code: '"[object String]" === Object.prototype.toString.call(variable)', errors: [{message: 'You should use the angular.isString method'}]}, {code: 'variable === "[object String]"', errors: [{message: 'You should use the angular.isString method'}]}, {code: '"[object String]" === variable', errors: [{message: 'You should use the angular.isString method'}]},