So let’s assume I have written the correct code for the function named PriorityQueue
in the Create a Priority Queue Class challenge
If I made the following statements after defining the function, what should it return?
var test = new PriorityQueue(); test.enqueue(['taco',1]); test.enqueue(['kitten',0]); test.enqueue(['dog',0]); test.enqueue(['apple',0]); test.enqueue(['whale',1]); test.printCollection();
I may be misinterpreting the challenge description, but I thought it should return the following array:
[ [ 'kitten', 0 ], [ 'dog', 0 ], [ 'apple', 0 ], [ 'taco', 1 ], [ 'whale', 1 ] ]
Because the challenge does not tell me what test assertion I failed should return, I have been trying to figure out if the test is buggy or my code is wrong. Is there a way to look at the assertions for each test in the browser?
Or better yet, whoever is creating the tests for this particular challenge, can it be modified to show the “should return” part like the regular Free Code Camp site?