<html>
<head>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0">
  <title>Mocha Tests</title>
  <link rel="stylesheet" href="stylesheets/test.css">
</head>
<body>
  <div id="mocha"></div>

  <script src="../cordova.js"></script>
  <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]);
          }
        }
      })();
    }

    if(window.cordova) {
      document.addEventListener('deviceready', function() { mocha.run() }, false);
    }
    else {
      mocha.run();
    }
  </script>
</body>
</html>

<html>
<head>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0">
  <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="../cordova.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]);
          }
        }
      })();
    }

    if(window.cordova) {
      document.addEventListener('deviceready', function() { mocha.run() }, false);
    }
    else {
      mocha.run();
    }
  </script>
</body>
</html>

Move order of cordova.js in test as well
Move order of cordova.js in test as well
