Skip to content

assertcheck v1.0.0


assertcheck / assert / groupedBy

Function: groupedBy()

ts
function groupedBy<T>(
   arr, 
   iteratee, 
   expectedGroups, 
   opts?): void;

Defined in: src/assert.ts:1411

Asserts the expected group keys produced by _.groupBy.

Type Parameters

Type Parameter
T

Parameters

ParameterType
arrT[]
iterateeValueIteratee<T>
expectedGroupsstring[]
opts?Opts

Returns

void

Example

ts
`assert.groupedBy(events, "type", ["click","view","purchase"])`

Released under the Apache 2.0 License. Built by Vagabond Studio — senior-only for growing companies.