Skip to content

Commit

Permalink
Fix scenario docs
Browse files Browse the repository at this point in the history
  • Loading branch information
yuriyyakym committed Dec 5, 2023
1 parent 886ff0b commit 926de5f
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions docs/docs/scenario.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,17 +40,17 @@ function scenario<T, R, E = unknown>(
- **cyclic** - runs scenario only if previous one is completed
- **once** - run scenario only one time

:::info Default strategy
By default instant scenarios use `cyclic` strategy, whereas scenarios with trigger use `fork` strategy. Exceptionally, if a trigger is a plain promise, default strategy is `once`, but this is a very unlikely case.
:::

## Events

- **started** - emitted on every scenario callback run
- **fulfilled** - emitted when scenario callback finished running
- **rejected** - emitted when callback throws
- **settled** - emitted when no more callbacks will be run

:::info Default strategy
By default instant scenarios use `cyclic` strategy, whereas scenarios with trigger use `fork` strategy. Exceptionally, if a trigger is a plain promise, default strategy is `once`, but this is a very unlikely case.
:::

## Examples

```ts title="Scenario of writing every counter change into sessionStorage" description="abc"
Expand Down

0 comments on commit 926de5f

Please sign in to comment.