From 87d36a7add0acb47599ccbfd44994a7249cff1da Mon Sep 17 00:00:00 2001 From: Vladimir Sheremet Date: Thu, 28 Mar 2024 16:06:55 +0100 Subject: [PATCH] fix: don't check for "node:internal/console/" in console interceptor in case the environment is not Node.js --- packages/vitest/src/runtime/console.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/vitest/src/runtime/console.ts b/packages/vitest/src/runtime/console.ts index 349ec24ad5de..6ea6feb98c74 100644 --- a/packages/vitest/src/runtime/console.ts +++ b/packages/vitest/src/runtime/console.ts @@ -13,7 +13,7 @@ function getTaskIdByStack(root: string) { if (!stack) return UNKNOWN_TEST_ID - const index = stack.findIndex(line => line.includes('at Console.value (node:internal/console/')) + const index = stack.findIndex(line => line.includes('at Console.value')) const line = index === -1 ? null : stack[index + 2] if (!line)