fix(ts2304): importa vi no AdminStructuralComparison.test (−19 erros baseline TSC)#218
Conversation
…s baseline)
O arquivo usa vi.mock/vi.fn 19x mas só importava { describe, it, expect }
do vitest, gerando 19 erros TS2304 "Cannot find name 'vi'". Adiciona `vi`
ao import. Mudança test-only, sem dependentes, sem alteração de runtime.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Warning Review limit reached
Your plan currently allows 1 review/hour. Refill in 51 minutes and 18 seconds. Your organization has run out of usage credits. Purchase more in the billing tab. ⌛ How to resolve this issue?After more review capacity refills, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than trial, open-source, and free plans. In all cases, review capacity refills continuously over time. Please see our FAQ for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
|
This pull request has been ignored for the connected project Preview Branches by Supabase. |
There was a problem hiding this comment.
Pull request overview
Corrige erros de typecheck (TS2304: “Cannot find name 'vi'”) em um teste que usa vi.mock/vi.fn, alinhando o arquivo com a API do Vitest e reduzindo o baseline do TSC sem impacto em runtime.
Changes:
- Adiciona
viao import devitestemAdminStructuralComparison.test.tsxpara resolver referências existentes avi.*.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Contexto
Campanha zerar baselines — chunk 1 (maior ROI isolado do baseline TSC).
src/tests/AdminStructuralComparison.test.tsxusavavi.mock/vi.fn19× mas importava apenas{ describe, it, expect }do vitest → 19× TS2304 "Cannot find name 'vi'" — o maior agrupamento num único arquivo de todo o.tsc-baseline.json(1060 erros).Mudança
Linha 1:
+ vino import do vitest. 1 linha, test-only, sem dependentes.Por que é seguro (sem flip / sem regressão)
vié a API canônica do vitest e está usada 19× → sem risco deno-unused-varsno ESLint.Efeito no gate
.tsc-baseline.jsonintocado nesta PR — regeneração oficial (1060→1041) em lote via VPS (tsc OOM no sandbox local).Próximos chunks: cluster Web Speech API (1 ambient decl, ~15),
@types/*(TS7016), TS2749 nos testes de sidebar.Summary by cubic
Importa vi de
vitestem src/tests/AdminStructuralComparison.test.tsx para corrigir 19 erros TS2304 (Cannot find name 'vi'). Reduz o baseline do TSC em 19; mudança só em testes, sem impacto em runtime.Written for commit 61ba02d. Summary will update on new commits. Review in cubic