SonarCloud reports tests don’t have any assertions, even though they do

  • ALM used - GitHub

  • CI system used - GitHub

  • Scanner command used when applicable - SonarSource/sonarqube-scan-action@v4.2.1 github action

  • Languages of the repository - TypeScript

  • Error observed - attached printscreen since there is no real logs for this case

  • Steps to reproduce - Sonarcloud scan over asserted test cases.

  • Potential workaround - None found so far, which means bypassing the quality gate results or considering it as a false positive.

SonarCloud reports the code doesn’t have assertions even tho the code has it:

1 Like

Hi,

I know it’s shown in the screenshot, but could you post the text of a reproducer here? That will make it a lot easier to investigate.

 
Thx,
Ann