O'Reilly logo

Web App Testing Using Knockout.JS by Roberto Messora

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Spies

A test double is a fundamental topic, which talks about unit testing. Jasmine provides its own implementation called spies.

Note

A test double is a particular object used to replace another object originally involved in the code under the test. Usually, a test double is a simplified version of the original one that behaves the same way and can be easily controlled during the test execution. The objective is to isolate the test execution context from everything that is not directly related to the test subject. In other words, if we want to test the behavior of a particular object that has some sort of interaction with other objects, we need something to tightly control the latter so that we can accurately define the execution context.

A spy ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required