Repository navigation
fix(#880): give the Ink render tests a local timeout above the unit project's 5s default - #882
Merged
admarble merged 1 commit intoJul 30, 2026
Conversation
…roject's 5s
App.test.tsx's stale-completedAt test failed under full-suite load with
`Test timed out in 5000ms` (reported at 5100ms) while passing 4/4 in isolation
in ~1s. Not a logic defect and not a wrong assertion -- a timeout.
Cause: neither Ink test file has an `.integration.` infix, so both land in the
`unit` vitest project, which keeps vitest's 5s default. vitest.config.ts states
that split deliberately ("the `unit` project keeps vitest's 5s default, where a
slow test is a real signal. Files needing more override it locally") -- so the
sanctioned fix is a local override, which is what this is. Same class as #842,
except the cost here is an in-process Ink render rather than a subprocess spawn,
which is why #842's fix (raising the *integration* project's timeout) did not
cover it.
Applied at FILE scope via `vi.setConfig`, not to the single observed test.
Measured in isolation, the other tests in these files take 180-640ms each --
the same curve the 5100ms case sits on -- so gating only the observed instance
would leave the class open. This is broader than #880's AC-3, which names just
the `advanceTimersByTimeAsync` tests; the measurements are in the comment so the
widening is reviewable rather than silent.
vitest.config.ts is untouched, so the `unit` project's 5s default still applies
everywhere else (AC-2). Verified empirically rather than by assertion: at
`--testTimeout=1`, version-check.test.ts fails while both Ink files pass, so the
override is strictly file-scoped and does not leak.
This was referenced Jul 30, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
App.test.tsx's stale-completedAttest failed under full-suite load withTest timed out in 5000ms(reported at 5100ms) while passing 4/4 in isolation in ~1s. Not a logic defect and not a wrong assertion — a timeout.Neither Ink test file has an
.integration.infix, so both land in theunitvitest project, which keeps vitest's 5s default.vitest.config.tsstates that split deliberately:So the sanctioned fix is a local override, which is what this is. Same class as #842, except the cost here is an in-process Ink render rather than a subprocess spawn — which is exactly why #842's fix (raising the integration project's timeout) never covered it.
Scope note: file-level, not just the observed test
#880's AC-3 names the
advanceTimersByTimeAsynctests. This applies the override at file scope instead, because measurement says the class is wider: in isolation the other tests in these files take 180–640ms each, the same curve the 5100ms case sits on. Gating only the observed instance would leave the next-slowest test one bad scheduling window away from the same failure. The measurements are in the code comment so the widening is reviewable rather than silent.Verification
--testTimeout=150reproducesTest timed outon exactly the render tests; they pass at the default in isolation--testTimeout=150forced globallyunitdefault unchanged, no leak--testTimeout=1,version-check.test.tsfails while both Ink files pass — the override is strictly file-scopedvitest.config.tsAC coverage
unitproject's 5s default unchangedadvanceTimersByTimeAsynctests get the same treatmentTest plan
npx vitest run src/ui/tui/→ 43 passednpx vitest run src/ui/tui/App.test.tsx src/ui/tui/ElapsedTimer.test.tsx --testTimeout=150→ 10 passednpx vitest run … src/lib/version-check.test.ts --testTimeout=1→ the non-overridden file fails, the two overridden files passFound by QA on #871 / PR #876, where this was the only failure in an otherwise-green 4727-test run.
Closes #880
Generated with Claude Code