diff --git a/test/no-fn-reference-in-iterator.js b/test/no-fn-reference-in-iterator.js index 2d2a62e84b..f89f3fcbe6 100644 --- a/test/no-fn-reference-in-iterator.js +++ b/test/no-fn-reference-in-iterator.js @@ -57,6 +57,10 @@ ruleTester.run('no-fn-reference-in-iterator', rule, { ...simpleMethods.map(method => `foo.${method}(element => fn(element))`), ...reduceLikeMethods.map(method => `foo.${method}((accumulator, element) => fn(element))`), + // `this.{map, filter, …}` + ...simpleMethods.map(method => `this.${method}(fn)`), + ...reduceLikeMethods.map(method => `this.${method}(fn)`), + // `Boolean` ...simpleMethods.map(method => `foo.${method}(Boolean)`), @@ -83,7 +87,10 @@ ruleTester.run('no-fn-reference-in-iterator', rule, { '_.map(fn)', 'Async.map(list, fn)', 'async.map(list, fn)', - 'React.children.forEach(children, fn)' + 'React.children.forEach(children, fn)', + + 'Vue.filter(name, fn)', + ], invalid: [ // Suggestions