Interface for executor functions created by expect.it().
ExpectItExecutor functions are the result of calling expect.it() with
assertion parameters. They encapsulate the assertion logic and can be
executed later within 'to satisfy' pattern matching contexts. These
functions are marked with an internal symbol to distinguish them from regular
functions during pattern validation.
The executor accepts a subject value and performs the embedded assertion
logic against it. The subject type is constrained by the Zod schema that
represents the first part of the assertion definition, ensuring type safety
during pattern matching.
Example
constisStringExecutor=expect.it('to be a string'); // isStringExecutor is an ExpectItExecutor<z.ZodString>
// Used within satisfy patterns expect({ name:'Alice'},'to satisfy',{ name:isStringExecutor,// Validates that name is a string });
See
ExpectItFunction for the factory function that creates executors
Interface for executor functions created by
expect.it()
.ExpectItExecutor
functions are the result of callingexpect.it()
with assertion parameters. They encapsulate the assertion logic and can be executed later within'to satisfy'
pattern matching contexts. These functions are marked with an internal symbol to distinguish them from regular functions during pattern validation.The executor accepts a subject value and performs the embedded assertion logic against it. The subject type is constrained by the Zod schema that represents the first part of the assertion definition, ensuring type safety during pattern matching.
Example
See
ExpectItFunction for the factory function that creates executors