expect(rtItem).toBe(1)
expect(queue.head).toBe(1)
expect(queue.tail).toBe(3)
+ expect(queue.max).toBe(3)
expect(queue.items).toStrictEqual({ 1: 2, 2: 3 })
rtItem = queue.dequeue()
expect(queue.size).toBe(1)
expect(rtItem).toBe(2)
expect(queue.head).toBe(2)
expect(queue.tail).toBe(3)
+ expect(queue.max).toBe(3)
expect(queue.items).toStrictEqual({ 2: 3 })
rtItem = queue.dequeue()
expect(queue.size).toBe(0)
expect(rtItem).toBe(3)
expect(queue.head).toBe(0)
expect(queue.tail).toBe(0)
+ expect(queue.max).toBe(3)
expect(queue.items).toStrictEqual({})
})
})