diff --git a/lib/test_runner.zig b/lib/test_runner.zig index 8a3c1f0ca7..46b24deb45 100644 --- a/lib/test_runner.zig +++ b/lib/test_runner.zig @@ -96,6 +96,13 @@ pub fn main() void { test_node.end(); }, } + // Workaround issue #1923 by clearing error stack traces between tests + // + // This is not a true fix, but helps isolate errors to the tests where they + // originate instead of confusing them all together + if (@errorReturnTrace()) |trace| { + trace.index = 0; + } } root_node.end(); if (ok_count == test_fn_list.len) {