etgryphon/stativus — Issue #26: Feature: Check if state is active
Author: johnnywengluu
Created: 2011-11-20 12:33:51+00:00
State: open

Is there a way to check if a state is active?

Kinda like:

statechart.isStateActive("Buy")

statechart.getActiveStates()

var states = statechart.getAllStates()
// iterate through states and check isActive is true or false

This would make writing tests simply since you could send some events then just assert that the states are active.