statebot
    Preparing search index...

    Function routeIsPossible

    • Assert that a certain route can be followed by a index.TStatebotFsm.

      This merely tests that a certain path can be taken through a state-machine. It doesn't assert that the states are moved-through while the machine is working, as with assertRoute.

      Parameters

      • machine: TStatebotFsm

        The machine to test the route on.

      • route: string | string[]

        The route to test as an arrow-delimited string:

        "idle -> pending -> success -> done"

      Returns boolean

      import { Statebot } from 'statebot'
      import { routeIsPossible } from 'statebot/assert'

      let machine = Statebot(...)

      routeIsPossible(machine,
      'walking -> falling -> splatting -> walking'
      )
      // false