Skip to content
This repository has been archived by the owner on Feb 6, 2019. It is now read-only.

Re-print out test failures after the summary #11

Open
robrix opened this issue Feb 22, 2016 · 1 comment
Open

Re-print out test failures after the summary #11

robrix opened this issue Feb 22, 2016 · 1 comment

Comments

@robrix
Copy link
Member

robrix commented Feb 22, 2016

Running the tests, I get this nice little summary:

✗ Broken » 129 honored ∙ 1 broken (0.043s)

However then I have to go and scroll up to find the failed tests unless they happen to be at the end of the list. hspec addresses this by printing them out at the end in full:

Corpus
  crashers should not crash
    test/crashers/433.js FAILED [1]
  should produce the correct diff
    test/diffs/word-diffs.js FAILED [2]
  lists example fixtures
…lots of other tests…
Failures:

  test/CorpusSpec.hs:27: 
  1) Corpus, crashers should not crash, test/crashers/433.js
       uncaught exception: ErrorCall (./Data/Vector/Generic.hs:386 (slice): invalid slice (19,-13,22))

  test/CorpusSpec.hs:27: 
  2) Corpus, should produce the correct diff, test/diffs/word-diffs.js
       expected: True
        but got: False

Something like that would be handy when testing grammars in a terminal without much vertical space or when there are lots and lots of tests.

@maxbrunsfeld
Copy link
Contributor

Yeah that's a good call. Currently, I'm using vows to generate a test suite. Maybe there's a different vows formatter we could use.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants