hspec-annotated-exception-0.0.0.0: Hspec hook that unwraps test failures from AnnotatedException
Safe HaskellNone
LanguageGHC2021

Test.Hspec.AnnotatedException

Synopsis

Documentation

unwrapAnnotatedHUnitFailure :: Spec -> Spec Source #

An hspec hook that lets hspec catch and pretty-print HUnitFailure, the exception that is thrown when a test assertion fails

Tests for any code that might throw AnnotatedException (which includes anything that uses freckle-app) should add this hook to their test suite. Without it, if you end up with an AnnotatedException HUnitFailure, hspec doesn't recognize it as an assertion failure and you get ugly output instead of nice output.

This hook does not alter whether a spec succeeds or fails; it only changes the type of exception that is thrown when an assertion fails.