component-test
component-test copied to clipboard
use suite.title for page title
this is really just my ocd, but when using component test browser, i don't want the page title to always be "domify tests"
could do something like this:
!function() {
var mocha = window.mochaPhantomJS || window.mocha;
var suites = mocha.suite.suites;
var title = [];
for (var i = 0; i < suites.length; i++) title.push(suites[i].title);
document.title = title.join(', ') + ' tests';
}()
in client/mocha.html. if you're up for it, i'll create a pr.
+1, I like where this is going but could the <title> get a bit long?
What if it changed on suite end?
wouldnt it make most sense to use the name prop of component.json?
it would, but we don't have access to that data with the current impl. :/