DEV Community

Discussion on: XState: Why I Love Invoked Callbacks

Collapse
mpocock1 profile image
Matt Pocock Author

You can mock invoked callbacks in exactly the same way as with services! Use a named service and then mock it in the same way.

Collapse
mpocock1 profile image
Matt Pocock Author

See the 'Event Listeners' example

Thread Thread
noriste profile image
Stefano Magni

My bad, sorry 🙏 thanks Matt!