如何在 HSpec 中指定测试套件?我将为我*.hs
的每个模块创建多个测试文件,我只想运行stack test
并运行所有测试。我该如何设置?
我试图在我的 cabal 文件中列出这样的测试模块,但它不起作用:
test-suite foo-test
type: exitcode-stdio-1.0
hs-source-dirs: test
main-is: Spec.hs
, Mod1Spec.hs
build-depends: base
, containers >= 0.5.6.2
, hqfl
, hspec >= 2.2.3
, hspec >= 2.2.3
, mtl >= 2.2.1
, pipes >= 4.1.8
, random >= 1.1
ghc-options: -threaded -rtsopts -with-rtsopts=-N
default-language: Haskell2010