Group tests in a describe

This commit is contained in:
Charlie Moore
2021-10-05 17:25:22 -04:00
parent 932599d37b
commit 6bb075df92

View File

@ -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])
}) })
}) })
})