Yes, I think that's fine. I can imagine that, in production, the command 
comes from a port at the top level. But in testing, you dependency inject 
in a dummy version. It's important to note that commands themselves are 
difficult to test, so this is a good way of moving them to the edges of 
your program.

Also, be aware that your dummy implementation will be faster than the real 
one, so you could possibly encounter race conditions (or not encounter ones 
that you would in prod), even though Elm and The Elm Architecture are 
pretty good at avoiding them.

-- 
You received this message because you are subscribed to the Google Groups "Elm 
Discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to