Skip to content

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

License

Notifications You must be signed in to change notification settings

freckle/hspec-annotated-exception

Repository files navigation

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

About

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

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •