Interface: IAsyncPropertyWithHooks<Ts>
Defined in: packages/fast-check/src/check/property/AsyncProperty.generic.ts:39
Interface for asynchronous property defining hooks, see IAsyncProperty
Remarks
Since 2.2.0
Extends
IAsyncProperty<Ts>
Type Parameters
| Type Parameter |
|---|
Ts |
Properties
runAfterEach
runAfterEach: () =>
Promise<void>
Defined in: packages/fast-check/src/check/property/IRawProperty.ts:81
Run after each hook
Returns
Promise<void>
Remarks
Since 3.4.0
Inherited from
runBeforeEach
runBeforeEach: () =>
Promise<void>
Defined in: packages/fast-check/src/check/property/IRawProperty.ts:75
Run before each hook
Returns
Promise<void>
Remarks
Since 3.4.0
Inherited from
Methods
afterEach()
afterEach(
hookFunction):IAsyncPropertyWithHooks<Ts>
Defined in: packages/fast-check/src/check/property/AsyncProperty.generic.ts:52
Define a function that should be called after all calls to the predicate
Parameters
| Parameter | Type | Description |
|---|---|---|
hookFunction | AsyncPropertyHookFunction | Function to be called |
Returns
IAsyncPropertyWithHooks<Ts>
Remarks
Since 1.6.0
beforeEach()
beforeEach(
hookFunction):IAsyncPropertyWithHooks<Ts>
Defined in: packages/fast-check/src/check/property/AsyncProperty.generic.ts:45
Define a function that should be called before all calls to the predicate
Parameters
| Parameter | Type | Description |
|---|---|---|
hookFunction | AsyncPropertyHookFunction | Function to be called |
Returns
IAsyncPropertyWithHooks<Ts>
Remarks
Since 1.6.0
generate()
generate(
mrng,runId?):Value<Ts>
Defined in: packages/fast-check/src/check/property/IRawProperty.ts:49
Generate values of type Ts
Parameters
| Parameter | Type | Description |
|---|---|---|
mrng | Random | Random number generator |
runId? | number | Id of the generation, starting at 0 - if set the generation might be biased |
Returns
Value<Ts>
Remarks
Since 0.0.7 (return type changed in 3.0.0)
Inherited from
isAsync()
isAsync():
true
Defined in: packages/fast-check/src/check/property/IRawProperty.ts:39
Is the property asynchronous?
true in case of asynchronous property, false otherwise
Returns
true
Remarks
Since 0.0.7
Inherited from
run()
run(
v):Promise<PreconditionFailure|PropertyFailure|null>
Defined in: packages/fast-check/src/check/property/IRawProperty.ts:65
Check the predicate for v
Parameters
| Parameter | Type | Description |
|---|---|---|
v | Ts | Value of which we want to check the predicate |
Returns
Promise<PreconditionFailure | PropertyFailure | null>
Remarks
Since 0.0.7
Inherited from
shrink()
Defined in: packages/fast-check/src/check/property/IRawProperty.ts:58
Shrink value of type Ts
Parameters
| Parameter | Type | Description |
|---|---|---|
value | Value<Ts> | The value to be shrunk, it can be context-less |
Returns
Remarks
Since 3.0.0