mirror of
https://github.com/oven-sh/bun
synced 2026-02-14 04:49:06 +00:00
## Summary - Add `expectMessageEventually(value)` to the bake test harness `Client` class — waits for a specific message to appear, draining any intermediate messages that arrived before it - Rewrite "hmr handles rapid consecutive edits" test to use raw `Bun.write` + sleep for intermediate edits and `expectMessageEventually` for the final assertion, avoiding flaky failures when HMR batches updates non-deterministically across platforms Fixes flaky failure on Windows where an extra "render 10" message arrived after `expectMessage` consumed its expected messages but before client disposal. ## Test plan - [x] `bun bd test test/bake/dev-and-prod.test.ts` — all 12 tests pass - [x] Ran the specific test multiple times to confirm no flakiness 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Alistair Smith <alistair@anthropic.com>