small cleanups

This commit is contained in:
nightwing 2012-05-25 11:28:20 +04:00
commit 6e1215a45e
13 changed files with 172 additions and 136 deletions

View file

@ -65,7 +65,11 @@ if (location.search)
testNames = location.search.substr(1).split(",")
require(testNames, function() {
var tests = testNames.map(require);
var tests = testNames.map(function(x) {
var module = require(x);
module.href = x;
return module;
});
async.list(tests)
.expand(function(test) {
@ -73,6 +77,12 @@ require(testNames, function() {
}, AsyncTest.TestGenerator)
.run()
.each(function(test, next) {
if (test.index == 1 && test.context.href) {
var href = test.context.href;
var node = document.createElement("div");
node.innerHTML = "<a href='?" + href + "'>" + href.replace(/^ace\//, "") + "</a>";
log.appendChild(node);
}
var node = document.createElement("div");
node.className = test.passed ? "passed" : "failed";