How is the recommended way to test a machine that have context properties? #4286
Unanswered
MiniSuperDev
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
For example, for the Todo MVC example of the docs, how the tests of the machine should be? (not the ui, cause I can use this machine in any framework, vue, react, cli)
https://github.comM/statelyai/xstate/tree/next/examples/todomvc-react
https://codesandbox.io/p/sandbox/github/statelyai/xstate/tree/next/examples/todomvc-react?file=/src/todosMachine.ts:1,1
For example, there I want to test when
newTodo.commit
event is used, the new todo is added and is now in the context, and so on for each possible case.Or there is a example that use the context to store some properties and is completely tested?
Thanks
Beta Was this translation helpful? Give feedback.
All reactions