Book Image

Backbone.js Testing

By : Ryan Glenn Roemer
Book Image

Backbone.js Testing

By: Ryan Glenn Roemer

Overview of this book

Table of Contents (13 chapters)
Backbone.js Testing
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

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).
    App.Config = _.extend(App.Config, {
      storeName: "notes-test" // localStorage for tests....