mirror of
https://github.moeyy.xyz/https://github.com/trekhleb/javascript-algorithms.git
synced 2024-12-26 23:21:18 +08:00
Code style updates for DoublyLinkedList tests.
This commit is contained in:
parent
c18d119a6a
commit
afa3346c48
@ -245,6 +245,7 @@ describe('DoublyLinkedList', () => {
|
|||||||
|
|
||||||
// Reverse linked list.
|
// Reverse linked list.
|
||||||
linkedList.reverse();
|
linkedList.reverse();
|
||||||
|
|
||||||
expect(linkedList.toString()).toBe('4,3,2,1');
|
expect(linkedList.toString()).toBe('4,3,2,1');
|
||||||
|
|
||||||
expect(linkedList.head.previous).toBeNull();
|
expect(linkedList.head.previous).toBeNull();
|
||||||
@ -261,6 +262,7 @@ describe('DoublyLinkedList', () => {
|
|||||||
|
|
||||||
// Reverse linked list back to initial state.
|
// Reverse linked list back to initial state.
|
||||||
linkedList.reverse();
|
linkedList.reverse();
|
||||||
|
|
||||||
expect(linkedList.toString()).toBe('1,2,3,4');
|
expect(linkedList.toString()).toBe('1,2,3,4');
|
||||||
|
|
||||||
expect(linkedList.head.previous).toBeNull();
|
expect(linkedList.head.previous).toBeNull();
|
||||||
|
Loading…
Reference in New Issue
Block a user