The debugger has the model, msg and the new model. So if you tell it that
the new model is indeed the expected return value from update msg model, it
can write that test for you. To use Counter as an example:
model = 0
update msg model =
case msg of
Up ->
model + 1
Down ->
model - 1
My model starts as 0. I send Up, I get 1. This is as expected so I accept.
update
Up 0 == 1 is now a test that the code has to pass.
I have raised this here as a feature
request: https://github.com/elm-lang/virtual-dom/issues/75 (see also Peter
Gao's comment). Can you foresee any problems with this feature? Would it in
fact be useless? I don't have a lot of testing experience.
--
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.