From e5ae01fcb1aba1b57a6df45965e221788298a1c1 Mon Sep 17 00:00:00 2001 From: Max Date: Sat, 14 Dec 2024 11:35:48 +0800 Subject: [PATCH] Update stack trace assertions in sourcemap_test.go to improve error message clarity; remove "Exception|" prefix from error messages for consistency in test outputs. --- runtime/v8/sourcemap_test.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/runtime/v8/sourcemap_test.go b/runtime/v8/sourcemap_test.go index 0ef0f2ca..036bb37b 100644 --- a/runtime/v8/sourcemap_test.go +++ b/runtime/v8/sourcemap_test.go @@ -64,7 +64,7 @@ func TestStackTrace(t *testing.T) { trace := StackTrace(e, nil) assert.NotEmpty(t, trace) - assert.Contains(t, trace, "Exception|400: Error occurred") + assert.Contains(t, trace, "400 Error occurred") assert.Contains(t, trace, "/scripts/runtime/ts/page.ts:12:2") assert.Contains(t, trace, "/scripts/runtime/ts/lib/bar.ts:7:2") assert.Contains(t, trace, "/scripts/runtime/ts/lib/err.ts:8:10") @@ -72,7 +72,7 @@ func TestStackTrace(t *testing.T) { // with source root trace = StackTrace(e, map[string]string{"/scripts": "/iscripts"}) assert.NotEmpty(t, trace) - assert.Contains(t, trace, "Exception|400: Error occurred") + assert.Contains(t, trace, "400 Error occurred") assert.Contains(t, trace, "/iscripts/runtime/ts/page.ts:12:2") assert.Contains(t, trace, "/iscripts/runtime/ts/lib/bar.ts:7:2") assert.Contains(t, trace, "/iscripts/runtime/ts/lib/err.ts:8:10") @@ -87,7 +87,7 @@ func TestStackTrace(t *testing.T) { trace = StackTrace(e, replace) assert.NotEmpty(t, trace) - assert.Contains(t, trace, "Exception|400: Error occurred") + assert.Contains(t, trace, "400 Error occurred") assert.Contains(t, trace, "/fscripts/runtime/ts/page.ts:12:2") assert.Contains(t, trace, "/fscripts/runtime/ts/lib/bar.ts:7:2") assert.Contains(t, trace, "/fscripts/runtime/ts/lib/err.ts:8:10")