SonarQube Not Recognizing Sinon: "Add at least one assertion to this test case"

Must-share information (formatted with Markdown):

  • which versions are you using: SonarQube 9.40.54424
  • what are you trying to achieve: Clean Scans
  • what have you tried so far to achieve this: Adding Sinon to the JS Execution Environments

SonarQube is not recognizing Sinon Assert statements.

Hello Dave,

Welcome to the Sonar community, and thank you for the feedback.

Indeed, as you rightfully pointed out, the rule does not recognize Sinon.JS assertion statements. Currently, it only considers Chai.js API. However, it definitely makes sense to extend the scope of the rule to Sinon.JS API as well.

I created this ticket to improve the rule as soon as possible.

Thank you,
Yassin

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.