-
My state machine uses as delay expression: https://xstate.js.org/docs/guides/delays.html#delay-expressions-on-transitions What is the best way to mock this time as elapsing or expression completing? For most other async related code I have relied on flushing promises like so:
and in tests
I'm not really sure how to mock this though, is there some exact action I need to send or something else? What's the best way to do this? |
Beta Was this translation helpful? Give feedback.
Answered by
ilovett
Jan 12, 2021
Replies: 1 comment 1 reply
-
My bad. I just found the |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
davidkpiano
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
My bad. I just found the
SimulatedClock
.