Skip to content

Commit 9da8dff

Browse files
author
James Halliday
committed
only render the test events right before they begin
1 parent 47848f2 commit 9da8dff

File tree

1 file changed

+11
-9
lines changed

1 file changed

+11
-9
lines changed

lib/results.js

+11-9
Original file line numberDiff line numberDiff line change
@@ -29,15 +29,17 @@ Results.prototype.createStream = function (opts) {
2929
self.on('_push', function ontest (t, extra) {
3030
if (!extra) extra = {};
3131
var id = testId++;
32-
var row = {
33-
type: 'test',
34-
name: t.name,
35-
id: id
36-
};
37-
if (extra.parent) {
38-
row.parent = extra.parent;
39-
}
40-
output.queue(row);
32+
t.once('prerun', function () {
33+
var row = {
34+
type: 'test',
35+
name: t.name,
36+
id: id
37+
};
38+
if (extra.parent) {
39+
row.parent = extra.parent;
40+
}
41+
output.queue(row);
42+
});
4143
t.on('test', function (st) {
4244
ontest(st, { parent: id });
4345
});

0 commit comments

Comments
 (0)