title: Using Jest, how can I check that an argument to a mocked function is a function?
body: <p>I'm trying this:</p>
  
  <pre><code>expect(AP.require).toBeCalledWith('messages', () =&gt; {})
  </code></pre>
  
  <p>where AP.require is a mocked function that should receive a string and a function as the second argument.</p>
  
  <p>Test fails with the message: </p>
  
  <pre><code>Expected mock function to have been called with:
    [Function anonymous] as argument 2, but it was called with [Function anonymous]
  </code></pre>