O'Reilly logo

Backbone.js Testing by Ryan Roemer

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

Aggregating and running the application tests

Finishing up the test driver page for both the collection and view tests, we integrate the necessary script includes and HTML test fixtures in chapters/03/test/test.html (shown in the relevant part in the following code snippet):

<head> <!-- ... snipped ... --> <!-- Test libraries. --> <script src="js/lib/mocha.js"></script> <script src="js/lib/chai.js"></script> <script src="js/lib/sinon.js"></script> <!-- JavaScript Core Libraries --> <script src="../app/js/lib/underscore.js"></script> <!-- ... snipped ... --> <!-- JavaScript Application Libraries --> <script src="../app/js/app/namespace.js"></script> <script src="../app/js/app/config.js"></script> <script> // Test overrides (before any app components). ...

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