prefer-to-have-length
Configuration
rslint.config.ts
Rule Details
Prefer toHaveLength() when asserting the length of a value. It produces clearer
failure output than comparing .length with toBe(), toEqual(), or
toStrictEqual().
Examples of incorrect code for this rule:
Examples of correct code for this rule: