prefer-to-have-been-called-times
Configuration
rslint.config.ts
Rule Details
In order to have a better failure message, toHaveBeenCalledTimes() should be
used instead of directly checking the length of mock.calls.
This rule triggers a warning if toHaveLength is used to assert the number of
times a mock has been called.
This rule is often used together with
prefer-to-have-length.
Examples of incorrect code for this rule:
Examples of correct code for this rule: