prefer-to-have-been-called
Configuration
rslint.config.ts
Rule Details
In order to have a better failure message, toHaveBeenCalled() and
not.toHaveBeenCalled() should be used when asserting that a mock has or has
not been called.
This rule triggers a warning if toHaveBeenCalledTimes or toBeCalledTimes is
used to assert that a mock has or has not been called zero times.
Examples of incorrect code for this rule:
Examples of correct code for this rule: