Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 8e33642

Browse files
committedMay 10, 2023
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

Lines changed: 4 additions & 3 deletions
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)
Please sign in to comment.