Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
<!doctype html>
<html><head>
<script runat="server" src="narwhal/packages/narwhal-jaxer/bootstrap.js"></script>
<script runat="server">
require.paths.push("/opt/narwhal"); // to find "tests"
// for output
system.print = function (s) { document.write(s + "<br />\n"); };
system.stdout.write = system.print;
var t = require("tests/all-tests"),
r = require("test/runner").run,
p = Jaxer.request.parsedUrl.queryParts.pass === "1";
// Tests will complain about new objects if this is not here
// Almost all tests get
// Assertion Failed in test method: AssertionError: New global introduced: "addEventListener"
// if this is not here
if (p) {Object.keys(t).forEach(function (i) { t[i].addsGlobals = true; });}
r(t);
</script>
</head><body>
<a href="test.html?pass=1">pass</a> <a href="test.html">or no pass</a>
</body></html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment