jest/prefer-to-contain
Configuration
rslint.config.ts
Rule Details
In order to have a better failure message, toContain() should be used upon asserting expectations on an array containing an object.
This rule triggers a warning if toBe(), toEqual() or toStrictEqual() is used to assert object inclusion in an array.
Examples of incorrect code for this rule:
Examples of correct code for this rule: