This is an unreasonable thing, since I built tests based on Hspec, in which colors all behave normally. But in this project, I cannot make the colors appear when I run all the test packages at once.
My project.cabal is configured as follows:
test-suite unit type: exitcode-stdio-1.0 main-is: SpecMain.hs hs-source-dirs: tests/unit other-modules: WikiSpec default-language: Haskell2010 ghc-options: -Wall -fno-warn-orphans -threaded build-depends: base >=4.6 ... test-suite integration type: exitcode-stdio-1.0 main-is: SpecMain.hs hs-source-dirs: tests/integration, webapp other-modules: ApiSpec default-language: Haskell2010 ghc-options: -Wall -fno-warn-orphans -threaded build-depends: base >=4.6 ...
And then my SpecMain.hs files (identical) contain the following:
{-
So, when I run the stack test , all my tests run, but the output is not colorized. If I run stack build --file-watch --test , the tests are executed, but if there is any failure at all, then all the output will be painted red. Finally, if I run stack test weblog:unit or stack test weblog:integration , then the colors end exactly as they should be. The headings are white, passing tests are green, failed tests are red, and pending tests are yellow.
When I'm active, I tend to depend on stack build --file-watch --test , but I really need colors to be right.
Do you have any ideas on what is happening, how can I fix it or what additional information do I need to provide?
source share