hspec / hspec-hedgehog

A library to integrate hedgehog tests into your hspec test suite.

Home Page:https://hackage.haskell.org/package/hspec-hedgehog

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Show less context on failure

voidus opened this issue · comments

Currently, hedgehog always shows the whole toplevel definition on failure (as far as I can tell)

in a long definition with a bunch of describes, this is a lot of stuff we probably don't care about.

I think it would be better to only show the innermost it-call. Not sure if this requires a change with hedgehog though.

This is something I would love to see as well.

From what I understand, the code that extracts the definitions is here: https://github.com/hedgehogqa/haskell-hedgehog/blob/master/hedgehog/src/Hedgehog/Internal/Discovery.hs#L44

If we don't want to reimplement all of the result formatting then I guess we would need to make this configurable in hedgehog somehow.

Draft PR: #29