test(core): verify event loop monitor cleanup
This commit is contained in:
parent
8c9b5b7b4e
commit
174dd561c5
1 changed files with 2 additions and 0 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue