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

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)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy