Skip to content

Commit

Permalink
Add getQueue() tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Alexandr Borisov committed Jun 10, 2024
1 parent 12f431d commit 17161ae
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions __tests__/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -81,10 +81,12 @@ it('support dynamic options', async function () {
}
await delay(90)
expect(onSuccess.callCount).toEqual(2)
expect(http.getQueue().length).toEqual(1)

await Promise.all(requests)
var end = Date.now()
expect(onSuccess.callCount).toEqual(3)
expect(http.getQueue().length).toEqual(0)
expect(end - start).toBeGreaterThan(100)
await delay(110)

Expand Down

0 comments on commit 17161ae

Please sign in to comment.