I've often worried about the commands bit.
For the view side, you need to test that you are deriving the right data to 
render, while it is Evan that needs to test that, given certain data, 
expected DOM elements get produced?

On Monday, 7 November 2016 07:44:36 UTC+1, Francesco Orsenigo wrote:
>
> How do you write unit tests to ensure that an `update : Msg -> Model -> ( 
> Model, Cmd Msg )` function is producing the correct commands?
> What if the function is supposed to produce several commands batched 
> together?
>
> Same thing for a `view : Model -> Html Msg`.
> Suppose I want to test whether, given a particular model, it will display 
> the correct number of list items.
> Do people write tests for this?
> Right now the only way to write this kind of tests I can think of is 
> creating the whole html tree as I expect it to be rendered, and comparing 
> it via == with the function output.
>

-- 
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