How to add HUnit to Yesod project

I am new to Yesod and have not tested with Cablal - I used a scaffolding tool to initialize a new Yesod project, wrote some handlers and other code, and now I'm afraid of adding some HUnit tests - how to do it in the best way? Using the cabal test-suite option? If so, how exactly? Some examples of the .cabal file and methods for running tests would be helpful.

+4
source share
1 answer

Yes, you should use the cabal test suite. There is a porting request on github to add testing to the Yesod scaffold by default. It will be soon combined.

+1
source

Source: https://habr.com/ru/post/1397084/


All Articles