Skip to content

Commit 2f1f870

Browse files
committed
generate proper JSON (for real this time?)
1 parent 78031c5 commit 2f1f870

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

src/main_wpt.zig

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -225,11 +225,14 @@ const Writer = struct {
225225
switch (self.format) {
226226
.text => return self.out.print("Fail\t{s}\n\t{s}\n", .{ test_file, err }),
227227
.summary => return self.out.print("Fail 0/0\t{s}\n", .{test_file}),
228-
.json => return std.json.stringify(Test{
229-
.pass = false,
230-
.name = test_file,
231-
.cases = &.{},
232-
}, .{ .whitespace = .indent_2 }, self.out),
228+
.json => {
229+
try std.json.stringify(Test{
230+
.pass = false,
231+
.name = test_file,
232+
.cases = &.{},
233+
}, .{ .whitespace = .indent_2 }, self.out);
234+
return self.out.writeByte(',');
235+
},
233236
}
234237
// just make sure we didn't fall through by mistake
235238
unreachable;

0 commit comments

Comments
 (0)