-
Notifications
You must be signed in to change notification settings - Fork 26
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
State Machine refactor #158
Conversation
{ | ||
tell: "doesNotLikeVoxa" | ||
}, | ||
"NoIntent" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was a feature intended since the beginning, finally got it working with code i actually feel good about
We cover all of this code from the VoxaApp specs
|
||
afterEach(() => { | ||
delete process.env.DEBUG; | ||
process.env = processData; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this was deleting my logs in the tests when running them with DEBUG=voxa yarn test --watch --bail
The code for the State Machine was getting too hairy, i refactored it to get a simpler model, create a new State Class, removed some of the features we rarely use and started using an actual
State
classBasically we no longer have the
entry
special state, that also means we now only have 2 ways of specifying a state, a function handler and a literal transition object. Before there was also theentry
way, which by the way could also take a function, this was leadomg to harder code in the StateMachine and from looking at our past projects wasn't a feature used often in recent projects