prefer-equality-matcher
Configuration
rslint.config.ts
Rule Details
Suggest using the built-in equality matchers.
Jest has built-in matchers for expecting equality, which allow for more readable tests and error messages if an expectation fails.
This rule checks for strict equality checks (=== and !==) in tests that
could be replaced with one of the following built-in equality matchers:
toBetoEqualtoStrictEqual
Fixes are provided as editor suggestions (one suggestion per matcher above).
Loose equality (== / !=) is not reported.
Examples of incorrect code for this rule:
Examples of correct code for this rule: