deadfoxygrandpa / elm-test

A unit testing framework for Elm
MIT License
204 stars 21 forks source link

test Task #26

Open maiermic opened 8 years ago

maiermic commented 8 years ago

I'd like to test a Task. Is this already possible?

deadfoxygrandpa commented 8 years ago

No, it’s not possible right now. This will require some planning, I think, since Tasks can perform effects. Are you thinking more like having a Task x a, performing it, and making assertions against the ultimate result, or are you thinking more along the lines of testing its actual effect? ​

On Tue, Oct 13, 2015 at 4:17 PM, Michael Maier notifications@github.com wrote:

I'd like to test a Task. Is this already possible?

— Reply to this email directly or view it on GitHub https://github.com/deadfoxygrandpa/Elm-Test/issues/26.

maiermic commented 8 years ago

I work on a native package that uses Tasks to calculate the result of asynchronous functions. I'm mainly interested in making assertions against the ultimate result. But I also like to test if errors (effects) appear as expected.

deadfoxygrandpa commented 8 years ago

This is something I'd like to add in the medium term. I'm not yet sure of the best way to go about it, I have some ideas, but it will surely involve adding Native code, which is a somewhat significant amount of work.

langston-barrett commented 8 years ago

I would love to see this feature! Tasks are the hardest part of Elm to debug. You can't evaluate them at the REPL or in test suites rn :cry: