mirror of
https://github.com/TheAlgorithms/JavaScript.git
synced 2025-07-05 16:26:47 +08:00
Group tests in a describe
This commit is contained in:
@ -1,5 +1,6 @@
|
|||||||
import { cycleSort } from '../CycleSort'
|
import { cycleSort } from '../CycleSort'
|
||||||
|
|
||||||
|
describe('cycleSort function', () => {
|
||||||
it('should correctly sort an input list that is sorted backwards', () => {
|
it('should correctly sort an input list that is sorted backwards', () => {
|
||||||
const array = [5, 4, 3, 2, 1]
|
const array = [5, 4, 3, 2, 1]
|
||||||
expect(cycleSort(array)).toEqual([1, 2, 3, 4, 5])
|
expect(cycleSort(array)).toEqual([1, 2, 3, 4, 5])
|
||||||
@ -65,3 +66,4 @@ describe('Variations of input array elements', () => {
|
|||||||
expect(cycleSort([4, 3, 4, 2, 1, 2])).toEqual([1, 2, 2, 3, 4, 4])
|
expect(cycleSort([4, 3, 4, 2, 1, 2])).toEqual([1, 2, 2, 3, 4, 4])
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
})
|
||||||
|
Reference in New Issue
Block a user