jest-extended
jest-extended copied to clipboard
Add `toBeCalledOnceWith` matcher for jest mocks
Feature Request
Hi, it would be great to see .toBeCalledOnceWith
custom matcher for jest mocks in this repo.
Usage:
expect(fn).toBeCalledOnceWith(true);
// usual way of doing this
expect(fn).toBeCalledWith(true);
expect(fn).toBeCalledTimes(1);
Are there any objectives against having that one?
This would be really useful for us - maybe a toHaveBeenCalledNTimesWith
would be more flexible?