mirror of
https://github.com/trekhleb/javascript-algorithms.git
synced 2026-02-04 10:33:51 +08:00
Code style fixes.
This commit is contained in:
@@ -227,20 +227,18 @@ describe('LinkedList', () => {
|
||||
let node = linkedList.find({ value: 3 });
|
||||
expect(node.value).toBe(4);
|
||||
|
||||
node = linkedList.find({ callback: value => value < 3 });
|
||||
node = linkedList.find({ callback: (value) => value < 3 });
|
||||
expect(node.value).toBe(1);
|
||||
});
|
||||
|
||||
it('should convert to array', () => {
|
||||
const linkedList = new LinkedList();
|
||||
|
||||
linkedList.append(1);
|
||||
linkedList.append(2);
|
||||
linkedList.append(3);
|
||||
|
||||
expect(linkedList.toArray().join(',')).toBe('1,2,3');
|
||||
});
|
||||
|
||||
|
||||
it('should reverse linked list', () => {
|
||||
const linkedList = new LinkedList();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user