O'Reilly logo

jQuery Essentials by Troy Miles

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

Using unit tests

Unit tests are a funny subject. It seems that everyone agrees that it is good to write tests, but few people actually do it. A complete examination of unit testing would take an entire book but, hopefully, we can cover just enough about unit tests to show you how to add them to your code and explain why you should.

My preferred unit test framework is Jasmine, http://jasmine.github.io/. This is not to slight any of the other fine frameworks available, but Jasmine works on the frontend and backend, works in the browser and the command line, is actively maintained, and does all one would want from a test framework. Keep in mind that while the code is written for Jasmine, the principles can be applied to any JavaScript unit test framework. ...

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