Skip to content

Commit

Permalink
linked-list: improve test for deleting first occurence only (#709)
Browse files Browse the repository at this point in the history
  • Loading branch information
cmccandless authored and SleeplessByte committed Aug 19, 2019
1 parent 8e436e2 commit 427d409
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion exercises/linked-list/linked-list.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -106,10 +106,14 @@ describe('LinkedList', () => {
});
xtest('deletes only the first occurence', () => {
const list = new LinkedList();
list.push(5);
list.push(10);
list.push(10);
list.push(2);
list.delete(10);
expect(list.count()).toBe(1);
expect(list.count()).toBe(3);
expect(list.pop()).toBe(2);
expect(list.pop()).toBe(10);
expect(list.pop()).toBe(5);
});
});

0 comments on commit 427d409

Please sign in to comment.