feat: more algos
This commit is contained in:
parent
5a946a1f53
commit
5335cc10b0
16 changed files with 151 additions and 78 deletions
|
|
@ -10,12 +10,24 @@ test("queue", function() {
|
|||
expect(list.dequeue()).toEqual(5);
|
||||
expect(list.length).toEqual(2);
|
||||
|
||||
// this must be wrong..?
|
||||
debugger
|
||||
|
||||
// i hate using debuggers
|
||||
list.enqueue(11);
|
||||
debugger;
|
||||
expect(list.dequeue()).toEqual(7);
|
||||
expect(list.dequeue()).toEqual(9);
|
||||
expect(list.peek()).toEqual(11);
|
||||
expect(list.dequeue()).toEqual(11);
|
||||
expect(list.dequeue()).toEqual(undefined);
|
||||
expect(list.length).toEqual(0);
|
||||
|
||||
// just wanted to make sure that I could not blow up myself when i remove
|
||||
// everything
|
||||
list.enqueue(69);
|
||||
expect(list.peek()).toEqual(69);
|
||||
expect(list.length).toEqual(1);
|
||||
});
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue