Skip to content

Commit

Permalink
logs are flushed as they come instead of saving them until later
Browse files Browse the repository at this point in the history
  • Loading branch information
unkiwii committed Dec 21, 2016
1 parent 082a159 commit f71dd03
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions reporter.js
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,9 @@ function VerboseReporter(logger) {
};

this.onBrowserLog = function(browser, message, level) {
forBrowser(browser).log.push({level: level == 'log' ? 'info' : level, message: message});
if (level == 'log') level = 'info';
var log = logger.create(browser.name);
(log[level] || log.info).call(log, message);
};

this.onBrowserError = function(browser, error) {
Expand All @@ -161,11 +163,6 @@ function VerboseReporter(logger) {

var log = logger.create(browser.name + suite + result.description);

b.log.forEach(function(entry) {
(log[entry.level] || log.info).call(log, entry.message);
});
b.log = [];

if (! tests.results) tests.results = {};
if (! tests.results[result.description]) {
tests.results[result.description] = {
Expand Down

0 comments on commit f71dd03

Please sign in to comment.