O'Reilly logo

Jasmine JavaScript Testing - Second Edition by Paulo Ragonha

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

Chapter 6. Light Speed Unit Testing

In Chapter 4, Asynchronous Testing – AJAX, we saw how including AJAX testing in the application can increase the complexity of the tests. In the example in that chapter, we created a server where the results were predictable. It was basically a complex test fixture. Even though we could have used a real server implementation, it would increase the complexity of the test even more; try changing the state of a server with a database or third-party services from the browser—it is not an easy or scalable solution.

There is also the impact on productivity; these requests take time to process and transmit, which hurts the quick feedback loop that unit testing usually provides.

You can also say that these specs test ...

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