The machine to test the route on.
39 |The route to test as an arrow-delimited string:
43 | "idle -> pending -> success -> done"
Generated using TypeDoc
Create a TStatebotFsm object
.
import { Statebot } from 'statebot'
let machine = Statebot('lemming', {
chart: `
walking -> (digging | building | falling) ->
walking
falling -> splatting
walking -> exiting
`
})
25 |
26 | Give your Statebot a name. Used for logging and by assertRoute.
33 |Generated using TypeDoc
Tests that an object is a TStatebotFsm.
23 | 24 |import { Statebot } from 'statebot'
let machine = Statebot(...)
isStatebot(machine)
// true
25 |
26 |
27 | The object to test.
34 |Generated using TypeDoc
Generated using TypeDoc
Generated using TypeDoc
Generated using TypeDoc
Generated using TypeDoc
Generated using TypeDoc
Generated using TypeDoc
Assert that a certain route can be followed by a 23 | TStatebotFsm.
24 |This merely tests that a certain path can be taken through a 25 | state-machine. It doesn't assert that the states are moved-through 26 | while the machine is working, as with 27 | assertRoute.
28 | 29 |Returns
30 |Example
32 |