diff --git a/code/addons/vitest/src/utils.ts b/code/addons/vitest/src/utils.ts index befbb6f45d17..ce8fed22e9d2 100644 --- a/code/addons/vitest/src/utils.ts +++ b/code/addons/vitest/src/utils.ts @@ -5,7 +5,7 @@ export function errorToErrorLike(error: Error): ErrorLike { message: error.message, name: error.name, // avoid duplicating the error message in the stack trace - stack: error.stack?.replace(error.message, ''), + stack: error.message + ' ' + error.stack?.replace(error.message, ''), cause: error.cause && error.cause instanceof Error ? errorToErrorLike(error.cause) : undefined, }; }