Skip to content

Commit

Permalink
only render the test events right before they begin
Browse files Browse the repository at this point in the history
  • Loading branch information
James Halliday committed Mar 4, 2014
1 parent 47848f2 commit 9da8dff
Showing 1 changed file with 11 additions and 9 deletions.
20 changes: 11 additions & 9 deletions lib/results.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,15 +29,17 @@ Results.prototype.createStream = function (opts) {
self.on('_push', function ontest (t, extra) {
if (!extra) extra = {};
var id = testId++;
var row = {
type: 'test',
name: t.name,
id: id
};
if (extra.parent) {
row.parent = extra.parent;
}
output.queue(row);
t.once('prerun', function () {
var row = {
type: 'test',
name: t.name,
id: id
};
if (extra.parent) {
row.parent = extra.parent;
}
output.queue(row);
});
t.on('test', function (st) {
ontest(st, { parent: id });
});
Expand Down

0 comments on commit 9da8dff

Please sign in to comment.