From 4d7fcb02ec66de5a9dd31321efda17c81652598a Mon Sep 17 00:00:00 2001 From: warnar boekkooi Date: Thu, 16 Apr 2026 07:55:29 +0200 Subject: [PATCH] fix: improve Error Trace output Signed-off-by: warnar boekkooi --- internal/assertions/testing.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/internal/assertions/testing.go b/internal/assertions/testing.go index 80565470a..aa77f72f2 100644 --- a/internal/assertions/testing.go +++ b/internal/assertions/testing.go @@ -92,6 +92,10 @@ func isTest(name, prefix string) bool { } func errorWithCallerInfo(t T, offset int, failureMessage string, msgAndArgs ...any) { + if h, ok := t.(H); ok { + h.Helper() + } + content := []labeledContent{ {"Error Trace", strings.Join(callerInfo(offset), "\n\t\t\t")}, {"Error", failureMessage},