Closed ragmha closed 3 years ago
Wow, that is oddly written code. But I'll accept that this is a thing, looking at https://jestjs.io/docs/en/api#2--testeachtablename-fn-timeout-
Technically, the invokation of test.each with a template string is a tagged template string.
That must be returning a function, which in itself is being called with a string (returns ..
and an arrow function (({a, b, expected ...
) as the parameters.
What kind of function is that test.each tagged template string supposed to return?
It returns expect of each test cases
E.g
expect(1 + 1).toBe(2);
expect(1 + 2).toBe(3);
..
...
I'll come up with a patch that will accept this as a valid callable, but the linter won't be able to dive in and perform a security analysis for dynamically generated functions... Thank you for filing this!
The error message is:
Error in no-unsanitized: Unexpected Callee.
ESLint version is:7.15.0
eslint-plugin-no-unsanitized version:3.1.4
The minimal code to reproduce:Thanks!