jest-extended icon indicating copy to clipboard operation
jest-extended copied to clipboard

Add `toBeCalledOnceWith` matcher for jest mocks

Open maksnester opened this issue 3 years ago • 1 comments

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?

maksnester avatar Aug 02 '21 13:08 maksnester

This would be really useful for us - maybe a toHaveBeenCalledNTimesWith would be more flexible?

harry-gocity avatar Nov 14 '22 18:11 harry-gocity