Make sure to read this post before raising a thread here:
Then tell us:
What language is this for? JavaScript
Which rule? S2699
Why do you believe it’s a false-positive/false-negative? This rule does not include expect.poll which is a valid assertion but the linter reports error.
Are you using
SonarQube Cloud? No
SonarQube Server / Community Build - which version? No
SonarQube for IDE - which IDE/version? No
in connected mode with SonarQube Server / Community Build or SonarQube Cloud?
How can we reproduce the problem? Give us a self-contained snippet of code (formatted text, no screenshots)
Just add this code to your project
import { expect, test } from 'vitest'
test('element exists', async () => {
await expect.poll(() => document.querySelector('.element')).toBeTruthy()
})
and then run ESLint with eslint-plugin-sonarjs plugin