Skip to content

assertcheck v1.0.0


assertcheck / assert / last

Function: last()

ts
function last<T>(
   arr, 
   expected, 
   opts?): void;

Defined in: src/assert.ts:1261

Asserts that the last element equals expected — Ruby arr.last.

Type Parameters

Type Parameter
T

Parameters

ParameterType
arrT[]
expectedT
opts?Opts

Returns

void

Example

ts
`assert.last(pipeline, finalStep, "pipeline must end with finalStep")`

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