Skip to content

Commit bff70be

Browse files
authored
fix(typechecking): support typechecking parsing with Vite 6 (#7335)
1 parent a8d123c commit bff70be

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

packages/vitest/src/typecheck/collect.ts

+7
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,13 @@ export async function collectTests(
9797
// call as `__vite_ssr__.test.skip()`
9898
return getName(callee.object?.property)
9999
}
100+
// unwrap (0, ...)
101+
if (callee.type === 'SequenceExpression' && callee.expressions.length === 2) {
102+
const [e0, e1] = callee.expressions
103+
if (e0.type === 'Literal' && e0.value === 0) {
104+
return getName(e1)
105+
}
106+
}
100107
return null
101108
}
102109

0 commit comments

Comments
 (0)