<html>
<head>
  <meta charset="utf-8">
  <title>Mocha Tests</title>
  <link rel="stylesheet" href="stylesheets/test.css">
</head>

<body>
  <div id="mocha"></div>
  <script src="javascripts/vendor.js"></script>
  <script src="../javascripts/vendor.js"></script>
  <script src="../javascripts/app.js"></script>
  <script src="javascripts/tests.js"></script>

  <script>
    // Set up Mocha and Chai
    mocha.setup('bdd');
    window.assert = chai.assert;
    window.expect = chai.expect;
    window.should = chai.should();

    // Load all test modules (modules are under test/)
    if(window.require) {
      (function() {
        var modules = window.require.list();
        for(var index = 0; index < modules.length; index++) {
          if(/^test\//.test(modules[index])) {
            require(modules[index]);
          }
        }
      })();
    }

    mocha.run();
  </script>
</body>

</html>

<html>
<head>
  <meta charset="utf-8">
  <title>Mocha Tests</title>
  <link rel="stylesheet" href="stylesheets/test.css">
</head>

<body>
  <div id="mocha"></div>
  <script src="javascripts/vendor.js"></script>
  <script> // Set up Mocha and Chai
    mocha.setup('bdd');
    window.assert = chai.assert;
    window.expect = chai.expect;
    window.should = chai.should();
  </script>
  <script src="../javascripts/vendor.js"></script>
  <script src="../javascripts/app.js"></script>
  <script src="javascripts/tests.js"></script>

  <script>
    // Load all test modules (modules are under test/)
    if(window.require) {
      (function() {
        var modules = window.require.list();
        for(var index = 0; index < modules.length; index++) {
          if(/^test\//.test(modules[index])) {
            require(modules[index]);
          }
        }
      })();
    }

    mocha.run();
  </script>
</body>

</html>

Set up Mocha and Chai before Angular Mocks
Set up Mocha and Chai before Angular Mocks
