Skip to content

Commit f3ec6fc

Browse files
authored
fix(bun): parsing of stack trace for bun runtime (#9032)
1 parent 7063d4d commit f3ec6fc

File tree

1 file changed

+1
-1
lines changed
  • packages/vitest/src/integrations

1 file changed

+1
-1
lines changed

packages/vitest/src/integrations/vi.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -783,7 +783,7 @@ function getImporter(name: string) {
783783
const stackArray = stackTrace.split('\n')
784784
// if there is no message in a stack trace, use the item - 1
785785
const importerStackIndex = stackArray.findLastIndex((stack) => {
786-
return stack.includes(` at Object.${name}`) || stack.includes(`${name}@`)
786+
return stack.includes(` at Object.${name}`) || stack.includes(`${name}@`) || stack.includes(` at ${name} (`)
787787
})
788788
const stack = parseSingleStack(stackArray[importerStackIndex + 1])
789789
return stack?.file || ''

0 commit comments

Comments
 (0)