Calling Through

Learn how to use the callThrough and callFake methods.

We'll cover the following

A Jasmine object spy sits in front of the real object. When our test code calls a method on the underlying object, Jasmine will intercept that call and can take a number of actions. By default, Jasmine uses the stub strategy, which means it returns undefined and does not execute the underlying method.

Get hands-on with 1200+ tech skills courses.