Skip to content

assertcheck v1.0.0


assertcheck / assert / zippedWith

Function: zippedWith()

ts
function zippedWith<A, B>(
   a, 
   b, 
   predicate, 
   opts?): void;

Defined in: src/assert.ts:1389

Asserts that two arrays, when zipped together, satisfy the predicate for every pair — Ruby arr.zip(other).all? { |a,b| ... }.

Type Parameters

Type Parameter
A
B

Parameters

ParameterType
aA[]
bB[]
predicate(a, b) => boolean
opts?Opts

Returns

void

Example

ts
`assert.zippedWith(inputs, outputs, (i, o) => o.id === i.id, "ids must match")`

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