test(core): verify event loop monitor cleanup

This commit is contained in:
Kit Langton
2026-07-19 22:54:41 -04:00
parent 8c9b5b7b4e
commit 174dd561c5
@@ -16,6 +16,8 @@ test("measures an immediate event-loop block and stops sampling", async () => {
const startedAt = performance.now()
while (performance.now() - startedAt < 60) {}
const maxMs = monitor.stop()
const stoppedAt = performance.now()
while (performance.now() - stoppedAt < 60) {}
await Bun.sleep(40)
expect(maxMs).toBeGreaterThanOrEqual(20)