Created
August 1, 2009 01:45
-
-
Save smith/159537 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <!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