Summary

In this chapter, you have learned how asynchronous tests can hurt the quick feedback loop you can get with unit testing. I showed how you can use either Stubs or Fakes to make your specs run quicker and with fewer dependencies.

We have seen three different ways you could test AJAX request, with a simple Jasmine Stub and with the more advanced, Fake XMLHttpRequest, and the Fake server from the library Sinon.JS.

You also got more familiar with Spies and Stubs, and should be more comfortable in using them in different scenarios.

In the next chapter, we are going further in the complexity of our application, and we will do an overall refactoring to transform it into a fully featured single page application with Backbone.js.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset