From fe683a11e243a461c487f19e5f9f6b4d6347055d Mon Sep 17 00:00:00 2001 From: TonyRL Date: Fri, 24 May 2024 20:19:41 +0000 Subject: [PATCH] chore: unwrap error detail in test route --- scripts/workflow/test-route/test.mjs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/scripts/workflow/test-route/test.mjs b/scripts/workflow/test-route/test.mjs index 8fc1966f1b..545db42b75 100644 --- a/scripts/workflow/test-route/test.mjs +++ b/scripts/workflow/test-route/test.mjs @@ -31,7 +31,10 @@ export default async function test({ github, context, core }, baseUrl, routes, n detail += '\n\n'; detail += errInfoList .slice(0, 5) - .map((e) => (e.length > 1000 ? e.slice(0, 1000) + '...' : e).trim()) + .map((e) => { + e = e.replaceAll(/|<\/code>/g, '').trim(); + return e.length > 1000 ? e.slice(0, 1000) + '...' : e; + }) .join('\n'); } }