I'm trying this:
expect(AP.require).toBeCalledWith('messages', () => {})
where AP.require is a mocked function that should receive a string and a function as the second argument.
Test fails with the message:
Expected mock function to have been called with:
[Function anonymous] as argument 2, but it was called with [Function anonymous]