Skip to content

Commit

Permalink
chore: cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
sheremet-va committed Jan 12, 2024
1 parent 52e00ac commit 445cbb8
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/vitest/src/node/hoistMocks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import type { AwaitExpression, CallExpression, Identifier, ImportDeclaration, Va
import { findNodeAround } from 'acorn-walk'
import type { PluginContext } from 'rollup'
import { esmWalker } from '@vitest/utils/ast'
import { highlight } from '@vitest/utils'
import { generateCodeFrame } from './error'

export type Positioned<T> = T & {
Expand Down Expand Up @@ -256,7 +257,7 @@ export function hoistMocks(code: string, id: string, parse: PluginContext['parse
name: 'SyntaxError',
message: _error.message,
stack: _error.stack,
frame: generateCodeFrame(code, 4, insideCall.start + 1),
frame: generateCodeFrame(highlight(code), 4, insideCall.start + 1),
}
throw error
}
Expand Down
4 changes: 4 additions & 0 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 445cbb8

Please sign in to comment.