diff --git a/src/data-structures/doubly-linked-list/__test__/DoublyLinkedList.test.js b/src/data-structures/doubly-linked-list/__test__/DoublyLinkedList.test.js index 68bd1c44..d3798f4c 100644 --- a/src/data-structures/doubly-linked-list/__test__/DoublyLinkedList.test.js +++ b/src/data-structures/doubly-linked-list/__test__/DoublyLinkedList.test.js @@ -245,6 +245,7 @@ describe('DoublyLinkedList', () => { // Reverse linked list. linkedList.reverse(); + expect(linkedList.toString()).toBe('4,3,2,1'); expect(linkedList.head.previous).toBeNull(); @@ -261,6 +262,7 @@ describe('DoublyLinkedList', () => { // Reverse linked list back to initial state. linkedList.reverse(); + expect(linkedList.toString()).toBe('1,2,3,4'); expect(linkedList.head.previous).toBeNull();