hspec-hedgehog icon indicating copy to clipboard operation
hspec-hedgehog copied to clipboard

Ugly error messages when using `cabal run`

Open LightAndLight opened this issue 3 years ago • 0 comments

Priority level (IMO): "nice to have".

I often use cabal run my-library-tests to run tests because it prints incremental, coloured output while the tests are running. cabal test my-library only prints on failure.

Today I had a test failure, and I found the errors weren't very nice. Instead of annotating the source like in this image, the error appeared like this:

forAll0 =
  <some value>
         
━━━ Failed (- lhs) (+ rhs) ━━━
- <left value>
+ <right value>

I figured out I can work around this using cabal test my-library --test-show-details=direct, which gives incremental coloured output and annotated test failures. I'd expect cabal run my-library-tests to behave the same way.

LightAndLight avatar Jul 12 '22 05:07 LightAndLight