import { getGroupedMapById } from '../../../utils/GroupBy.util'; describe('GroupBy.util', () => { describe('GroupById', () => { it('should return proper value', () => { // given const input = [ { id: 'A' }, { id: 'B' }, { id: 'C' }, ]; const output = { A: [{ id: 'A' }], B: [{ id: 'B' }], C: [{ id: 'C' }], }; expect(getGroupedMapById(input)) .toEqual(output); }); }); });