Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

Test gaps found in the Oct 7 code review: fakes, snapshot-only e2e assertions and fixed sleeps

Aperta
#196 1 commento 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
5/5
Tempo stimato
Più di una settimana
Idoneità per principianti
35/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
typescript
Ambito
testing

Direzione di ricerca

Start with the high-severity bug issues #159–#178 and the named test entry points: tests/e2e/chat.test.ts, tests/e2e/panels.test.ts, retry.test.ts, and session.test.ts. Compare the fakes and assertions with the real dependency contracts, then prioritize failure-path tests in the affected modules. Done means the listed gaps are covered, e2e checks verify rendered state, and fixed sleeps are replaced with condition waits.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

priority: medium severity: low tests

The 2026-10-07 code review found several tests that pass without checking what they are meant to check. Bug-specific tests are listed in each bug's issue (#159–#178); this issue covers the patterns.

Problems

  • Fakes that behave better than the real dependency:
    • The fake sandbox helper exits after sending an error, which hid #162.
    • retry.test.ts only feeds hand-built error objects and never passes a real SDK stream error through runTurn, which hid #173.
    • The browser tests use fake timers.
  • E2E checks main-process state, not the screen: waitFor in tests/e2e/chat.test.ts:44-57 and similar polls chat:snapshot from the main process. Main/renderer desync such as #161 is invisible to the suite.
  • Fixed sleeps: tests/e2e/panels.test.ts:46 (waitForTimeout(1500)), documentation-visuals.test.ts:99,171,179,198, long_run.test.ts:100, and many 100–200 ms polls.
  • Failure paths with no tests:
    • session.test.ts only covers keep-alive: no stop/resume/resumable, stop during compaction, or editUndone and plan-mode notes.
    • No test where chat_manager.open() fails.
    • MCP: no server dying, stop() during a connect, connect timeout, or tool-name collisions.
    • Shell: no foreground timeout, output cap, or leftover-process test.
    • Code index: no failure mid-update and no concurrent callers.
    • No corrupt settings or project files.
    • Rust helper: no recovery with one failing record.
  • Renderer: app.ts, transcript.ts, panels.ts and dialogs.ts have no unit tests.

Fix

  • Make fakes match the real contract (the helper stays alive until stdin closes; a stream error comes wrapped as the SDK wraps it).
  • Add DOM-level assertions to e2e tests that cover state sync.
  • Replace fixed sleeps with condition waits.
  • Add the failure-path tests above, starting with the modules the high-severity bugs live in.
Lingua principale
TypeScript
Stelle
2
Fork
2
Merge medio
5h 28m
PR unite (30g)
24

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di PierrunoYT/patch

Tutte le issue di PierrunoYT/patch

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.