Skip to content

Commit

Permalink
Add more tests to check default priority
Browse files Browse the repository at this point in the history
  • Loading branch information
AjayPoshak committed Jul 8, 2019
1 parent 0793196 commit 9a24a11
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion test.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,13 @@ console.assert(pq.peek() === null)

pq.clear()

console.assert(pq.dequeue() === null)
console.assert(pq.dequeue() === null)

pq.queue(51)
pq.queue(52)
pq.queue(53)
pq.queue(54, 2)
console.assert(pq.dequeue() === 54)
console.assert(pq.dequeue() === 51)
console.assert(pq.dequeue() === 52)
console.assert(pq.dequeue() === 53)

0 comments on commit 9a24a11

Please sign in to comment.