freckle-app-1.23.0.1: Haskell application toolkit used at Freckle
Safe HaskellNone
LanguageGHC2021

Freckle.App.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.