Fix sorted list edge case

This commit is contained in:
Daniel Imms
2022-05-11 09:49:23 -07:00
parent 931ee9e89e
commit 999f255893
3 changed files with 10 additions and 1 deletions
+2
View File
@@ -74,9 +74,11 @@ describe('SortedList', () => {
list.insert(8);
list.insert(6);
assertList([5, 5, 5, 6, 8, 8]);
deepStrictEqual(Array.from(list.getKeyIterator(1)), []);
deepStrictEqual(Array.from(list.getKeyIterator(5)), [5, 5, 5]);
deepStrictEqual(Array.from(list.getKeyIterator(6)), [6]);
deepStrictEqual(Array.from(list.getKeyIterator(8)), [8, 8]);
deepStrictEqual(Array.from(list.getKeyIterator(9)), []);
});
it('clear', () => {
list.insert(1);