<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <title>ScrollProxy Browser Tests</title>
  <link href="../bower_components/mocha/mocha.css" rel="stylesheet">
</head>
<body>
  <div id="mocha"></div>
  <script src="../bower_components/mocha/mocha.js"></script>
  <script>mocha.setup('bdd')</script>
  <script src="testBundle.js" data-cover></script>
  <script>
    mocha.run()
    if (navigator.userAgent.indexOf('PhantomJS') < 0) {
      onload = function(){
        var runner = mocha.run();

        var failedTests = [];
        runner.on('end', function(){
          window.mochaResults = runner.stats;
          window.mochaResults.reports = failedTests;
        });

        runner.on('fail', logFailure);

        function logFailure(test, err){

          var flattenTitles = function(test){
            var titles = [];
            while (test.parent.title){
              titles.push(test.parent.title);
              test = test.parent;
            }
            return titles.reverse();
          };

          failedTests.push({name: test.title, result: false, message: err.message, stack: err.stack, titles: flattenTitles(test) });
        };
      };
    }
  </script>
</body>
</html>

<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <title>ScrollProxy Browser Tests</title>
  <link href="../bower_components/mocha/mocha.css" rel="stylesheet">
</head>
<body>
  <div id="mocha"></div>
  <script src="../bower_components/mocha/mocha.js"></script>
  <script>mocha.setup('bdd')</script>
  <script src="testBundle.js"></script>
  <script>
    onload = function(){
      var runner = mocha.run();

      var failedTests = [];
      runner.on('end', function(){
        window.mochaResults = runner.stats;
        window.mochaResults.reports = failedTests;
      });

      runner.on('fail', logFailure);

      function logFailure(test, err){

        var flattenTitles = function(test){
          var titles = [];
          while (test.parent.title){
            titles.push(test.parent.title);
            test = test.parent;
          }
          return titles.reverse();
        };

        failedTests.push({name: test.title, result: false, message: err.message, stack: err.stack, titles: flattenTitles(test) });
      };
    };
  </script>
</body>
</html>

Remove PhantomJS conditional since mochify runs it externally
Remove PhantomJS conditional since mochify runs it externally
