Skip to content

Commit 3a90274

Browse files
committed
add unit test for PR jakesgordon#97
1 parent d77fff3 commit 3a90274

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

test/test_basics.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -634,6 +634,11 @@ test("wildcard 'from' allows event from any state (github issue #11)", function(
634634
fsm.pause(); equal(fsm.current, 'paused', "pause event should transition from running to paused");
635635
fsm.stop(); equal(fsm.current, 'stopped', "stop event should transition from paused to stopped");
636636

637+
deepEqual(fsm.transitions(), ["prepare", "stop"], "ensure wildcard event (stop) is included in available transitions")
638+
fsm.prepare(); deepEqual(fsm.transitions(), ["start", "stop"], "ensure wildcard event (stop) is included in available transitions")
639+
fsm.start(); deepEqual(fsm.transitions(), ["pause", "stop"], "ensure wildcard event (stop) is included in available transitions")
640+
fsm.stop(); deepEqual(fsm.transitions(), ["prepare", "stop"], "ensure wildcard event (stop) is included in available transitions")
641+
637642
});
638643

639644
//-----------------------------------------------------------------------------

0 commit comments

Comments
 (0)