Skip to content

Commit

Permalink
fix: don't check for "node:internal/console/" in console interceptor …
Browse files Browse the repository at this point in the history
…in case the environment is not Node.js
  • Loading branch information
sheremet-va committed Mar 28, 2024
1 parent 3463f9b commit 87d36a7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/vitest/src/runtime/console.ts
Expand Up @@ -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)
Expand Down

0 comments on commit 87d36a7

Please sign in to comment.