Skip to content

Commit

Permalink
Modify rule S2699: add support for supertest (#3830)
Browse files Browse the repository at this point in the history
  • Loading branch information
ilia-kebets-sonarsource authored Apr 8, 2024
1 parent 25977fe commit d4d9b7e
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion rules/S2699/javascript/rule.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,11 @@ When the unit test is executed, the assertions are evaluated. If all the asserti

Without assertions, a unit test doesn't actually verify anything, making it ineffective in catching potential bugs or regressions. It will always pass, regardless of the implementation of the unit. This can lead to a false sense of security, as you may believe that your code is working correctly when it might not be.

This rule raises an issue when the assertion library ``++chai++``,``++sinon++`` or ``++vitest++`` is imported but no assertion is used in a test.
This rule raises an issue when one of the following assertion libraries is imported but no assertion is used in a test:
- ``++chai++``
- ``++sinon++``
- ``++vitest++``
- ``++supertest++``

[source,javascript,diff-id=1,diff-type=noncompliant]
----
Expand Down

0 comments on commit d4d9b7e

Please sign in to comment.