diff --git a/src/stress/groupBy.ts b/src/stress/groupBy.ts index bed1f0d..524d60d 100644 --- a/src/stress/groupBy.ts +++ b/src/stress/groupBy.ts @@ -3,7 +3,7 @@ import { DefaultMap } from '../collection/default-map'; export function groupBy( values: Iterable, keyer: (value: T) => K, -): Record { +): Record { return Object.fromEntries(groupByAsMap(values, keyer)) as Record; } diff --git a/src/stress/sortBy.spec.ts b/src/stress/sortBy.spec.ts index bd34033..7cb9c36 100644 --- a/src/stress/sortBy.spec.ts +++ b/src/stress/sortBy.spec.ts @@ -1,6 +1,6 @@ import { sortBy } from './sortBy'; -describe('orderBy', () => { +describe('sortBy', () => { it('sorts value DESC by "natural" JS ordering', () => { expect(sortBy([2, 3, 1], (v) => v, false)).toEqual([3, 2, 1]); expect(sortBy([1, 1, 2], (v) => v, false)).toEqual([2, 1, 1]);