Automatically discovers and runs Doctests, based on the current hpack configuration.
Define one (or more) test suite(s) in your package.yaml
configuration:
tests:
my-package-test:
main: Doctest.hs
source-dirs: test
ghc-options:
- -threaded
- -rtsopts
- -with-rtsopts=-N
dependencies:
- doctest
- doctest-discover-hpack
- my-package
- my-package-exe
Initialize the corresponding driver file(s) with:
{-# OPTIONS_GHC -F -pgmF doctest-discover-hpack #-}
Upon running your tests, using eg:
stack test my-package-test
the dependencies of the test suite(s) will automatically be tested, using any necessary language extension, based on:
default-extensions
,default-extensions
of the test suite,default-extensions
of the tested dependency,{-# LANGUAGE #-}
pragmas of each tested source file.