arrayItemSatisfiesAssertion:AssertionFunctionSync< readonly[ ZodArray<ZodUnknown>, readonly[ "to have item satisfying", "to have an item satisfying", "to contain item satisfying", ], ZodUnknown, ], (subject:unknown[],shape:unknown)=>{message:string}|undefined, readonly[ ZodArray<ZodUnknown>, PhraseLiteralChoiceSlot< readonly[ "to have item satisfying", "to have an item satisfying", "to contain item satisfying", ], >, ZodUnknown, ], > = ...
Asserts that an array contains an item that satisfies a given shape or
pattern. Uses partial matching semantics - the item only needs to match the
specified properties.
Example
expect([{ a:1, b:2},{ c:3}],'to have item satisfying',{ a:1});// passes expect([{ a:1},{ b:2}],'to have an item satisfying',{ c:3});// fails expect([1,2,3],'to contain item satisfying',2);// passes (exact match)
Asserts that an array contains an item that satisfies a given shape or pattern. Uses partial matching semantics - the item only needs to match the specified properties.