diff options
Diffstat (limited to 'share/www/script/couch_test_runner.js')
-rw-r--r-- | share/www/script/couch_test_runner.js | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/share/www/script/couch_test_runner.js b/share/www/script/couch_test_runner.js index 31bd4a4a..ae357aeb 100644 --- a/share/www/script/couch_test_runner.js +++ b/share/www/script/couch_test_runner.js @@ -12,8 +12,8 @@ // *********************** Test Framework of Sorts ************************* // -function loadTests(url) { - document.write('<script src="'+url+'"></script>'); +function loadScript(url) { + if (typeof document != "undefined") document.write('<script src="'+url+'"></script>'); }; function patchTest(fun) { @@ -67,7 +67,7 @@ function runTest(button, callback, debug) { var row = currentRow = $(button).parents("tr").get(0); $("td.status", row).removeClass("error").removeClass("failure").removeClass("success"); $("td", row).text(""); - var testFun = tests[row.id]; + var testFun = couchTests[row.id]; function run() { numFailures = 0; var start = new Date().getTime(); @@ -110,12 +110,12 @@ function showSource(cell) { var name = $(cell).text(); var win = window.open("", name, "width=700,height=500,resizable=yes,scrollbars=yes"); win.document.title = name; - $("<pre></pre>").text(tests[name].toString()).appendTo(win.document.body).fadeIn(); + $("<pre></pre>").text(couchTests[name].toString()).appendTo(win.document.body).fadeIn(); } function updateTestsListing() { - for (var name in tests) { - var testFunction = tests[name]; + for (var name in couchTests) { + var testFunction = couchTests[name]; var row = $("<tr><th></th><td></td><td></td><td></td></tr>") .find("th").text(name).attr("title", "Show source").click(function() { showSource(this); |