How can I get the arguments called in jest mock function?
I want to inspect the object that is passed as argument.
I prefer lastCalledWith() over toHaveBeenCalledWith(). They are both the same but the former is shorter and help me reduce the cognitive load when reading code.
lastCalledWith()
expect(mockedFn).lastCalledWith('arg1', 'arg2')