S2699: false positive test assertions with playwright polll

Make sure to read this post before raising a thread here:

Then tell us:

  • What language is this for? Typescript
  • Which rule? S2699

I get an error but there is clearly a expectation.
I am using eslint-plugin-sonarjs (4.2.0) and also sonarqube server (paid customer)

    test('should save selected cookie consent categories', async ({
        page,
        render,
        timers,
        visit,
    }) => {
        await test.step('Setup', async () => {
             // etc.
        });

        await test.step('Saves the selected cookie categories', async () => {
            await expect
                .poll(() =>
                    page.evaluate(
                        () =>
                            document.cookie
                                .split('; ')
                                .find((cookie) => cookie.startsWith('cookie_preference='))
                                ?.split('=', 2)[1],
                    ),
                )
                .toBe('essential,statistical,marketing');
        });
    });

Hey @lukpsaxo, I think this looks similar to this other post which was fixed by this Jira ticket, and released recently. Could you confirm which version of SonarQube Server are you using? Do you also see the issue with the eslint plugin?

yes this is fixed in 4.2.1