Skip to main content

Function: commands()

Call Signature

commands<Model, Real, CheckAsync>(commandArbs, constraints?): Arbitrary<Iterable<AsyncCommand<Model, Real, CheckAsync>, any, any>>

Defined in: packages/fast-check/src/arbitrary/commands.ts:24

For arrays of AsyncCommand to be executed by asyncModelRun

This implementation comes with a shrinker adapted for commands. It should shrink more efficiently than array for AsyncCommand arrays.

Type Parameters

Type Parameter
Model extends object
Real
CheckAsync extends boolean

Parameters

ParameterTypeDescription
commandArbsArbitrary<AsyncCommand<Model, Real, CheckAsync>>[]Arbitraries responsible to build commands
constraints?CommandsContraintsConstraints to be applied when generating the commands (since 1.11.0)

Returns

Arbitrary<Iterable<AsyncCommand<Model, Real, CheckAsync>, any, any>>

Remarks

Since 1.5.0

Call Signature

commands<Model, Real>(commandArbs, constraints?): Arbitrary<Iterable<Command<Model, Real>, any, any>>

Defined in: packages/fast-check/src/arbitrary/commands.ts:40

For arrays of Command to be executed by modelRun

This implementation comes with a shrinker adapted for commands. It should shrink more efficiently than array for Command arrays.

Type Parameters

Type Parameter
Model extends object
Real

Parameters

ParameterTypeDescription
commandArbsArbitrary<Command<Model, Real>>[]Arbitraries responsible to build commands
constraints?CommandsContraintsConstraints to be applied when generating the commands (since 1.11.0)

Returns

Arbitrary<Iterable<Command<Model, Real>, any, any>>

Remarks

Since 1.5.0