Repository navigation
test: count only Help panel timers in Help navigation tests - #1958
Conversation
renkun-ken
left a comment
There was a problem hiding this comment.
Reviewed commit 6e331cc32f6db87ad7949593cee227185231d98a; no actionable findings.
The module tracker covers the timeout scheduled by HelpPanel.getScrollY(), and teardown restores it before the fake clock. The new assertion that one scroll timeout is pending guards against silently failing to track Help timers, while the existing zero-count assertions still check cancellation.
Local validation passed: TypeScript compilation, extension build, formatting of the changed file, and all 17 Help navigation tests in VS Code 1.145.2. Hosted build/lint/format/typecheck, all Node jobs, and Linux/Windows extension jobs also passed.
The failed macOS extension job passed all 17 Help navigation tests and the full provider suite (603 passing). Its failure is a 60-second timeout in the unchanged Interactive test "Workspace follows native focus and bound sources, and actions retain their displayed owner", which runs in a separate extension host. That appears unrelated to this change; please rerun that job before merging.
The Help panel navigation tests checked
clock.countTimers()after each navigation and sometimes found one pending fake timer (Linux and macOS, different tests each time). Fake timers replacesetTimeoutfor the whole extension host, so that count includes timers scheduled by unrelated code.The tests now count only timers scheduled from the Help panel module, using the
trackModuleTimershelper that the Session Terminal tests already use. One test also checks that a pending scroll timeout is counted, so the tracker cannot silently count nothing.