In Jasmine, which function is used to create spies that can track calls, arguments, and return values?

  • createSpy
  • spyOn
  • trackSpy
  • watchSpy
In Jasmine, the spyOn function is used to create spies. Spies are functions that can replace existing functions or be standalone, and they allow you to track function calls, arguments passed to them, and even control their behavior, including returning specific values.
Add your answer
Loading...

Leave a comment

Your email address will not be published. Required fields are marked *