Question · JavaScript and TypeScript course · Module 11: Testing with Jest

The toHaveBeenCalledWith Matcher

What does the toHaveBeenCalledWith matcher check in Jest?

Answer options

  • Whether the mock function was called with specific arguments
  • Whether the mock function is still active
  • Whether the mock function was created correctly
  • Whether the mock function returned a specific value

You can check the correct answer by solving this task in the CodeWorlds game.