assertcheck / assert / includes
Function: includes()
ts
function includes<T>(
arr,
item,
opts?): void;Defined in: src/assert.ts:836
Asserts that the array contains the given item (using _.includes).
Type Parameters
| Type Parameter |
|---|
T |
Parameters
| Parameter | Type |
|---|---|
arr | T[] |
item | T |
opts? | Opts |
Returns
void
Example
ts
`assert.includes(roles, "admin", "admin role required")`