prefer-called-with
Configuration
rslint.config.ts
Rule Details
The toHaveBeenCalled() and toBeCalled() matchers assert that a mock function
has been called one or more times, without checking the arguments passed. The
assertion is stronger when arguments are also validated using
toHaveBeenCalledWith() or toBeCalledWith(). When some arguments are difficult
to check, using generic matchers such as expect.anything() at least enforces the
number and position of arguments.
Examples of incorrect code for this rule:
Examples of correct code for this rule: