简体   繁体   English

如何将HUnit添加到Yesod项目中

[英]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? 我是Yesod的初学者,没有使用Cablal的经验 - 我使用脚手架工具初始化一个新的Yesod项目,写了一些处理程序和其他代码,现在我正在努力添加一些HUnit测试 - 如何在一个最好的办法? Using cabal's test-suite option? 使用cabal的测试套件选项? If yes then how exactly? 如果是,那么究竟如何呢? Some examples of the .cabal file and how to run the tests would be helpful. .cabal文件的一些示例以及如何运行测试将会很有帮助。

yes, you should use the cabal test suite. 是的,你应该使用cabal测试套件。 There is a pull request on github to add testing to the default Yesod scaffold. github上有一个pull请求,可以将测试添加到默认的Yesod脚手架中。 It will be merged soon. 它很快就会合并。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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