Skip to content

Commit

Permalink
fix(typechecking): support typechecking parsing with Vite 6 (#7335)
Browse files Browse the repository at this point in the history
  • Loading branch information
sheremet-va authored Jan 22, 2025
1 parent a8d123c commit bff70be
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions packages/vitest/src/typecheck/collect.ts
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,13 @@ export async function collectTests(
// call as `__vite_ssr__.test.skip()`
return getName(callee.object?.property)
}
// unwrap (0, ...)
if (callee.type === 'SequenceExpression' && callee.expressions.length === 2) {
const [e0, e1] = callee.expressions
if (e0.type === 'Literal' && e0.value === 0) {
return getName(e1)
}
}
return null
}

Expand Down

0 comments on commit bff70be

Please sign in to comment.