Jest · Matcher
toHaveBeenLastCalledWith
Checks that a Jest mock's most recent call used specific arguments. It also has the alias lastCalledWith.
Last updated
Syntax
expect(mock).toHaveBeenLastCalledWith(arg1, arg2, ...)In-depth API docs are only for subscribers: parameters, examples, common mistakes and interview practice.
SubscribeRelated
expect(value)toHaveBeenCalledWithtoHaveBeenNthCalledWithjest.fn()