Skip to content

Commit 878a500

Browse files
committedJan 13, 2024
[Refactor] Results createStream: clean up _push handler
1 parent 19cfc8f commit 878a500

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed
 

‎lib/results.js

+1-2
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,6 @@ Results.prototype.createStream = function (opts) {
113113
if (opts.objectMode) {
114114
output = through();
115115
self.on('_push', function ontest(t, extra) {
116-
if (!extra) { extra = {}; }
117116
var id = testId++;
118117
t.once('prerun', function () {
119118
var row = {
@@ -123,7 +122,7 @@ Results.prototype.createStream = function (opts) {
123122
skip: t._skip,
124123
todo: t._todo
125124
};
126-
if (hasOwn(extra, 'parent')) {
125+
if (extra && hasOwn(extra, 'parent')) {
127126
row.parent = extra.parent;
128127
}
129128
output.queue(row);

0 commit comments

Comments
 (0)
Please sign in to comment.