<!doctype html>
<head>
  <meta charset="utf-8">
  <title>Acorn test suite</title>
  <script src="../acorn.js"></script>
  <script src="driver.js"></script>
  <script src="tests.js"></script>
</head>

<script>
  var testsRun = 0, failed = 0;
  function report(state, code, message) {
    if (state != "ok") {++failed; console.log(code, message);}
    ++testsRun;
  }
  window.onload = function(){
    var t0 = +new Date;
    runTests(report);
    console.log(testsRun + " tests run in " + (+new Date - t0) + "ms");
    if (failed) console.log(failed + " failures.");
    else console.log("All passed.");
  };
</script>

<!doctype html>
<head>
  <meta charset="utf-8">
  <title>Acorn test suite</title>
  <script src="../acorn.js"></script>
  <script src="driver.js"></script>
  <script src="tests.js"></script>
</head>

<script>
  var testsRun = 0, failed = 0;
  function report(state, code, message) {
    if (state != "ok") {++failed; console.log(code, message);}
    ++testsRun;
  }
  window.onload = function(){
    var t0 = +new Date;
    runTests(report);
    var out = testsRun + " tests run in " + (+new Date - t0) + "ms\n";
    if (failed) out += failed + " failures.\n";
    else out += "All passed.\n";
    document.body.appendChild(document.createElement("pre")).appendChild(document.createTextNode(out));
  };
</script>

Write test status to dom rather than console
Write test status to dom rather than console
