Unlimited Plugins, WordPress themes, videos & courses! Unlimited asset downloads! From $16.50/m
by
Lessons:15Length:1.8 hours
Testingjasmin
  • Overview
  • Transcript

3.2 Spy Methods

In this lesson we look at the methods we have for working with the spy that allows us to control exactly how the spy behaves. We see that each of the methods are available from the object and can be chained to the object returned by the spyOn method. Specifically we’ll cover the callThrough, callFake, returnValue, throwError and stub methods.