hspec-annotated-exception: Hspec hook that unwraps test failures from AnnotatedException

[ library, mit, utils ] [ Propose Tags ] [ Report a vulnerability ]

An hspec hook that lets hspec catch and pretty-print HUnitFailure, the exception that is thrown when a test assertion fails, in the correct way even if it is wrapped in AnnotatedException.


[Skip to Readme]

Downloads

Maintainer's Corner

Package maintainers

For package maintainers and hackage trustees

Candidates

  • No Candidates
Versions [RSS] 0.0.0.0
Change log CHANGELOG.md
Dependencies annotated-exception (>=0.2.0.5), base (>=4.17.2.1 && <5), hspec (>=2.11.10), HUnit (>=1.6.2.0), lens (>=5.2.3), text (>=2.0.2) [details]
License MIT
Author
Maintainer Freckle Education
Category Utils
Home page https://github.com/freckle/hspec-annotated-exception#readme
Bug tracker https://github.com/freckle/hspec-annotated-exception/issues
Source repo head: git clone https://github.com/freckle/hspec-annotated-exception
Uploaded by PatrickBrisbin at 2025-06-03T19:09:11Z
Distributions
Downloads 3 total (3 in the last 30 days)
Rating (no votes yet) [estimated by Bayesian average]
Your Rating
  • λ
  • λ
  • λ
Status Docs available [build log]
Last success reported on 2025-06-03 [all 1 reports]

Readme for hspec-annotated-exception-0.0.0.0

[back to package description]

haskell-library-template

When using hspec to test a project that uses annotated-exception, an AnnotatedException thrown by the code under test does not display well in Hspec's output. hspec-annotated-exception fixes this.

To use this package with Hspec module auto-discovery:

module SpecHook (hook) where

import Test.Hspec (Spec)
import Test.Hspec.AnnotatedException (unwrapAnnotatedHUnitFailure)

hook :: Spec -> Spec
hook = unwrapAnnotatedHUnitFailure

CHANGELOG | LICENSE