@@ -180,8 +180,8 @@ test "Browser.Console" {
180180 }, .{});
181181
182182 const captured = test_capture .captured .items ;
183- try testing .expectEqual ("[info] args=a" , captured [0 ]);
184- try testing .expectEqual ("[warn] args=hello world 23 true [object Object] " , captured [1 ]);
183+ try testing .expectEqual ("[info] args= 1: a" , captured [0 ]);
184+ try testing .expectEqual ("[warn] args= 1: hello world 2: 23 3: true 4: #< Object> " , captured [1 ]);
185185 }
186186
187187 {
@@ -222,13 +222,17 @@ test "Browser.Console" {
222222
223223 const captured = test_capture .captured .items ;
224224 try testing .expectEqual ("[assertion failed] values=" , captured [0 ]);
225- try testing .expectEqual ("[assertion failed] values=x true" , captured [1 ]);
226- try testing .expectEqual ("[assertion failed] values=x" , captured [2 ]);
225+ try testing .expectEqual ("[assertion failed] values= 1: x 2: true" , captured [1 ]);
226+ try testing .expectEqual ("[assertion failed] values= 1: x" , captured [2 ]);
227227 }
228228}
229229const TestCapture = struct {
230230 captured : std .ArrayListUnmanaged ([]const u8 ) = .{},
231231
232+ fn separator (_ : * const TestCapture ) []const u8 {
233+ return " " ;
234+ }
235+
232236 fn reset (self : * TestCapture ) void {
233237 self .captured = .{};
234238 }
@@ -269,6 +273,15 @@ const TestCapture = struct {
269273 self .capture (scope , msg , args );
270274 }
271275
276+ fn fatal (
277+ self : * TestCapture ,
278+ comptime scope : @Type (.enum_literal ),
279+ comptime msg : []const u8 ,
280+ args : anytype ,
281+ ) void {
282+ self .capture (scope , msg , args );
283+ }
284+
272285 fn capture (
273286 self : * TestCapture ,
274287 comptime scope : @Type (.enum_literal ),
0 commit comments