Skip to content

Commit a78e6bd

Browse files
bteasheremet-va
authored andcommittedJul 11, 2023
fix: modify condition
1 parent 88b3975 commit a78e6bd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed
 

‎packages/vitest/src/node/error.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,7 @@ export function displayDiff(diff: string | null, console: Console) {
191191

192192
function printErrorMessage(error: ErrorWithDiff, logger: Logger) {
193193
const errorName = error.name || error.nameStr || 'Unknown Error'
194-
if (!(error instanceof Error)) {
194+
if (!error.message) {
195195
logger.error(error)
196196
return
197197
}

0 commit comments

Comments
 (0)
Please sign in to comment.