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

vitest/expect-expect throws false positive in v1.1.18 #603

Closed
dirkluijk opened this issue Dec 18, 2024 · 1 comment · Fixed by #604
Closed

vitest/expect-expect throws false positive in v1.1.18 #603

dirkluijk opened this issue Dec 18, 2024 · 1 comment · Fixed by #604

Comments

@dirkluijk
Copy link

dirkluijk commented Dec 18, 2024

In 1.1.18 of @vitest/eslint-plugin, there seems to be a regression in the vitest/expect-expect rule, which doesn't seem present in 1.1.17 or lower.

Reproduction

Go to https://stackblitz.com/edit/vitejs-vite-spv6ulzt?file=package.json
Run npm run lint in console

You see 8:38 error Test has no assertions vitest/expect-expect, whereas an assertion is present.

Environment

TypeScript 5.7
ESLint 9.17.0
typescript-eslint 8.18.1

@veritem
Copy link
Member

veritem commented Dec 19, 2024

@y-hsgw could you check your changes in #600? I think there is a bug around this diff https://github.com/vitest-dev/eslint-plugin-vitest/pull/600/files#diff-5e10d81f15e90dc8a24d75b57d5f24879b3b80a6eec3adb8ae699e8bb1030f0eL255-L256

The same changes also probably caused #601

Do you mind having a look?

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

Successfully merging a pull request may close this issue.

2 participants