Skip to content

bun test: drain the event loop for script files with no test() registrations - #34862

Open
robobun wants to merge 15 commits into
mainfrom
claude/farm/14b6b439/test-drain-script-files
Open

bun test: drain the event loop for script files with no test() registrations#34862
robobun wants to merge 15 commits into
mainfrom
claude/farm/14b6b439/test-drain-script-files

test: drop explanatory comments from the no-drain guards

40a7e62
Select commit
Loading
Failed to load commit list.
Claude / Claude Code Review completed Jul 21, 2026 in 17m 33s

Code review found 1 important issue

Found 1 candidates, confirmed 3. See review comments for details.

Details

Severity Count
🔴 Important 1
🟡 Nit 2
🟣 Pre-existing 0
Severity File:Line Issue
🟡 Nit src/runtime/cli/test_command.rs:3280-3282 Misleading doc comment on script_keepalive_count: 'Zero means the file's own work is the only thing keeping the loop ali

Annotations

Check warning on line 3282 in src/runtime/cli/test_command.rs

See this annotation in the file changed.

@claude claude / Claude Code Review

Misleading doc comment on script_keepalive_count: 'Zero means the file's own work is the only thing keeping the loop alive'

The third sentence is backwards: a return of zero means *nothing* is keeping the loop alive — if "the file's own work" were keeping it alive, that work would be counted and the result would be >0. The intended meaning is temporal: zero *at `after_preloads`* means the loop was idle before this file loaded, so any handle seen later during the drain must belong to it. Suggest e.g. "Zero at `after_preloads` means the loop was idle before this file loaded, so every handle observed during the drain be