Skip to content

Commit

Permalink
Feat delay ready (#209)
Browse files Browse the repository at this point in the history
* feat: 🎸 ready event latency

* test: 💍 time gap test

* 1.19.5

* fix: 🐛 typo

* test: 💍 log actual delta
  • Loading branch information
hcfw007 authored May 10, 2022
1 parent d2ae00e commit 5805a31
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion tests/ready-event.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,8 @@ test('ready event test', async t => {
await t.resolves(login, 'should resolve')
await t.resolves(ready, 'should resolve')

t.ok((readyTime - loginTime) > 80 && (readyTime - loginTime) < 120, 'time delta between login and ready event should be around 100')
const delta = readyTime - loginTime
t.ok(delta > 80 && delta < 120, `time delta between login and ready event should be around 100, actual delta is ${delta}ms`)

await puppetService.stop()
await puppetServer.stop()
Expand Down

0 comments on commit 5805a31

Please sign in to comment.