Skip to content

Commit 4dff71e

Browse files
committed
test: improve PowerSort coverage
1 parent 4537784 commit 4dff71e

1 file changed

Lines changed: 11 additions & 0 deletions

File tree

‎Sorts/test/PowerSort.test.js‎

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,4 +80,15 @@ describe('PowerSort', () => {
8080

8181
expect(powerSort(array)).toEqual(expected)
8282
})
83+
it('should handle a final single-element run', () => {
84+
const array = [
85+
...Array.from({ length: 32 }, (_, index) => 100 - index),
86+
200
87+
]
88+
89+
expect(powerSort(array)).toEqual([
90+
...Array.from({ length: 32 }, (_, index) => index + 69),
91+
200
92+
])
93+
})
8394
})

0 commit comments

Comments
 (0)