Select which test to run with Hspec and stack

那年仲夏 提交于 2019-12-04 18:26:12

问题


I've written a series of test, using the automatic spec discovery feature of Hspec. I'm also using stack as my build tool.

My test directory has the the Spec.hs file, along with the test files for the different modules of my application (e.g. Module0Spec.hs, Module1Spec.hs).

Now, when I start writing a new test module, or when I want to re-run a failed test after code changes, I'd like to be able to run only a given test module.

Is there any way in which either stack or Hspec allow to do this?


回答1:


I found the answer here. I was trying with --, however I needed to use --test-arguments:

stack test --test-arguments "-m "Module0""


来源:https://stackoverflow.com/questions/39365402/select-which-test-to-run-with-hspec-and-stack

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!