Scroll down the list of tests after a test completed

This commit is contained in:
Marcel Klehr 2012-11-18 12:49:34 +01:00
parent a99ff139c9
commit 1b409d7b9d
1 changed files with 7 additions and 0 deletions

View File

@ -58,6 +58,13 @@ $(function(){
var WebdriverAndHtmlReporter = function(html_reporter){
return function(runner){
Base.call(this, runner);
// Scroll down test display after each test
mocha = $('#mocha')[0];
runner.on('test', function(){
mocha.scrollTop = mocha.scrollHeight;
});
//initalize the html reporter first
html_reporter(runner);