From bff70be978d42390d8af2a3b8b5ddd0556309fd0 Mon Sep 17 00:00:00 2001 From: Vladimir Date: Wed, 22 Jan 2025 16:04:32 +0100 Subject: [PATCH] fix(typechecking): support typechecking parsing with Vite 6 (#7335) --- packages/vitest/src/typecheck/collect.ts | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/packages/vitest/src/typecheck/collect.ts b/packages/vitest/src/typecheck/collect.ts index 12c7c988331b..66a239d052d1 100644 --- a/packages/vitest/src/typecheck/collect.ts +++ b/packages/vitest/src/typecheck/collect.ts @@ -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 }