* @param {PriorityQueue } pq * @return {Array }
(pq)
| 12 | * @return {Array<T>} |
| 13 | */ |
| 14 | function toArray(pq) { |
| 15 | const array = []; |
| 16 | while (pq.length) { |
| 17 | array.push(pq.dequeue()); |
| 18 | } |
| 19 | return array; |
| 20 | } |
| 21 | |
| 22 | it('should return the correct length of the queue', () => { |
| 23 | expect(pq.length).to.equal(0); |
no test coverage detected