Jest · Matcher
toHaveBeenNthCalledWith
Checks the arguments passed to a Jest mock on a specific call. Call numbering starts at 1.
Last updated
Syntax
expect(mockFn).toHaveBeenNthCalledWith(nthCall, arg1, arg2, ...)In-depth API docs are only for subscribers: parameters, examples, common mistakes and interview practice.
SubscribeRelated
expect(value)jest.fn().toHaveBeenCalledWith().toHaveBeenLastCalledWith().toHaveBeenCalledTimes()