简体   繁体   中英

How to add HUnit to a Yesod project

I'm quite a beginner to Yesod and not experienced with Cablal - I used the scaffolding tool to initialise a new Yesod project, wrote some handlers and other code and now I'm struggling with adding some HUnit tests - how to do this in a best way? Using cabal's test-suite option? If yes then how exactly? Some examples of the .cabal file and how to run the tests would be helpful.

yes, you should use the cabal test suite. There is a pull request on github to add testing to the default Yesod scaffold. It will be merged soon.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM