We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Summary vitest/no-standalone-expect seems to wrongly warn about an expect that is not standalone.
vitest/no-standalone-expect
Steps to reproduce Use Vitest with vitest/no-standalone-expect enabled in ESLint, run the following test:
// .eslintrc { "plugins": [ "vitest", ], "rules": { "vitest/no-standalone-expect": [ "error" ], }, }
// test.ts it.fails("should work", () => { expect(true).toBe(false); });
What you expected would happen ESLint shouldn't error on the expect, as it clearly is inside a test/it block.
What actually happens ESLint warns/errors (depending on your setting):
it.fails("should work", () => { expect(true).toBe(false); ^^^ ESLint: Expect must be called inside a test block(vitest/no-standalone-expect) });
Maybe related to #182?
The text was updated successfully, but these errors were encountered:
a pr is welcome!
Sorry, something went wrong.
Ah well, alright. Here you go: #276
Successfully merging a pull request may close this issue.
Summary
vitest/no-standalone-expect
seems to wrongly warn about an expect that is not standalone.Steps to reproduce
Use Vitest with
vitest/no-standalone-expect
enabled in ESLint, run the following test:What you expected would happen
ESLint shouldn't error on the expect, as it clearly is inside a test/it block.
What actually happens
ESLint warns/errors (depending on your setting):
Maybe related to #182?
The text was updated successfully, but these errors were encountered: