Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 5bad659

Browse files
committed
--fix: code coverage 100%
1 parent 0fb3c8d commit 5bad659

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

‎src/_DataStructures_/LinkedList/LinkedList.test.js‎

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -224,8 +224,11 @@ describe('Data Structures: Linked Lists', () => {
224224
});
225225

226226
it('Should remove and return the element at given index value', () => {
227-
expect(list.removeAt(3).data).toEqual('Welcome');
228-
expect(list.removeAt(2).data).toEqual('There!');
227+
list.delete();
228+
[1, 2, 3, 4, 5, 6, 7, 8, 9].forEach(el => list.addAtBeginning(el));
229+
expect(list.removeAt(10).data).toEqual(1);
230+
expect(list.removeAt(0).data).toEqual(9);
231+
expect(list.removeAt(5).data).toEqual(3);
229232
});
230233
});
231234
});

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /