If I have a mock function say myMockFunction I know I can check its calls like so:
const firstCall = myMockFunction.mock.calls[0];
Is there an easy/clean way to get the most recent call?
I think that the following would work:
const mostRecentCall = myMockFunction.mock.calls[myMockFunction.mock.calls.length -1];
This seems rather hacky/tiresome, is there a cleaner/easier way?