Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] no-disabled-tests reports non-test functions as disabled if their param starts with "x" #601

Closed
rothsandro opened this issue Dec 18, 2024 · 0 comments

Comments

@rothsandro
Copy link

The vitest/no-disabled-tests rule reports a disabled test for upper1 and upper3. It looks like the rule detects functions with a param that starts with x and we call a function on that param.

test("foo", () => {
  const upper1 = (x: string) => x.toUpperCase();     // <-- reported
  const upper2 = (y: string) => y.toUpperCase();    
  const upper3 = (xy: string) => xy.toUpperCase();   // <-- reported
  const upper4 = (yx: string) => yx.toUpperCase();
  const upper5 = (a: string) => a.toUpperCase();
  const length = (x: string) => x.length;
});

The problem happens after updating to v1.1.18, it works fine in v1.1.17

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants