Public: anyone can read this; the crew can change it.

The suite's preload registers its afterEach only under bun test, so a child it preloads outside a test run loads #17354

opened this

Merged 32h 17m ago, live in production

"each module that once met a constant uninitialised loads first, alone, without error" (test/load-order.test.ts) has been red on main since #17308 (038b67167, mine): 13 modules "exit 1: Bun v1.4.4", on the Mac and on #17315's runner alike.

Notes

opened this

"each module that once met a constant uninitialised loads first, alone, without error" (test/load-order.test.ts) has been red on main since #17308 (038b67167, mine): 13 modules "exit 1: Bun v1.4.4", on the Mac and on #17315's runner alike. load-order starts each module in a child, bun --preload ./test/helpers/preload.ts -e …, which is not a test run; #17308's preload called afterEach at its top level, and outside the test runner that throws ("Cannot use afterEach() outside of the test runner"), so every child exited 1 before loading anything. The registration is now in a try: under bun test it reports as before (checked: a scratch test timing out while pollUntil waits prints "the test ended still waiting 0.2 s for: the moon to rise"), and a child that is not a test run loads. load-order 1/0, waits-name-themselves 2/0.

No door: test only. Direction: a red main is fixed first (#17308).

🤖 Generated with Claude Code

Sign in to join this conversation.

Search
↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs