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

  <script src="../javascripts/vendor.js"></script>
  <script src="../javascripts/app.js"></script>
  <script src="javascripts/test-vendor.js"></script>
  <script src="javascripts/test.js"></script>
  <script>
  $(function() {
    require('test/initialize');
    if (window.mochaPhantomJS) { mochaPhantomJS.run(); }
    else { mocha.run(); }
  });
  </script>
</head>
<body>
  <div id="mocha"></div>
</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>
  </body>
  <script src="../javascripts/vendor.js"></script>
  <script src="../javascripts/app.js"></script>
  <script src="javascripts/test-vendor.js"></script>
  <script src="javascripts/test.js"></script>
  <script>
  $(function() {
    require('test/initialize');
    if (window.mochaPhantomJS) { mochaPhantomJS.run(); }
    else { mocha.run(); }
  });
  </script>
</html>

Move script tags below body
Move script tags below body

Some vendor scripts might try to acces the documents body before it's
added to the DOM. x3dom does this for example.
