Skip to content

Commit 8e33642

Browse files
committed
test: update check head test for SinglyLinkedList
1 parent 7be303f commit 8e33642

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

Data-Structures/Linked-List/test/SinglyLinkedList.test.js

+4-3
Original file line numberDiff line numberDiff line change
@@ -148,9 +148,10 @@ describe('SinglyLinkedList', () => {
148148

149149
list.addFirst(30)
150150
expect(list.head()).toBe(30)
151-
152-
list.addFirst(0)
153-
expect(list.head()).toBe(0)
151+
152+
// check for a falsy head data
153+
list.addFirst(false)
154+
expect(list.head()).toBe(false)
154155
})
155156

156157
it('Check tail', () => {

0 commit comments

Comments
 (0)