tree-sitter-cli
tree-sitter-cli copied to clipboard
Re-print out test failures after the summary
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.
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.