Unlimited Plugins, WordPress themes, videos & courses! Unlimited asset downloads! From $16.50/m
Lessons:10Length:2 hours
Crs 72842
  • Overview
  • Transcript

3.2 Spies and Retrospective Testing

This final episode is two fold. First we look at mocking out a method that hits a 3rd party API. Using Jasmine’s spying functionality we can hijack calls to the method and return sample JSON, to save our tests hitting the external API. Secondly, we look at a case when an eager colleague has written code without tests, and techniques to retrospectively fit tests to implementation code.