Cursors cab be easily mocked. Probably a good blogpost for someone to write
:)

On Wednesday, September 3, 2014, Richard Layte <[email protected]>
wrote:

> I'm having some problems unit testing Om components and how they update
> state. For example:
>
> (defn example-handler [{:keys [foo]} data]
>   (om/update! data :foo foo))
>
> Because om/update! requires a cursor there's no obvious way to test this
> in isolation.
>
> What would be the standard approach to writing this kind of user
> interaction test? Create a mock cursor and test against that? Or don't test
> this at the unit level and rely on acceptance/integration tests to catch
> this behaviour?
>
> --
> Note that posts from new members are moderated - please be patient with
> your first post.
> ---
> You received this message because you are subscribed to the Google Groups
> "ClojureScript" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected] <javascript:;>.
> To post to this group, send email to [email protected]
> <javascript:;>.
> Visit this group at http://groups.google.com/group/clojurescript.
>

-- 
Note that posts from new members are moderated - please be patient with your 
first post.
--- 
You received this message because you are subscribed to the Google Groups 
"ClojureScript" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/clojurescript.

Reply via email to