Open Wizek opened 6 years ago
Oh, and I found another shortcoming of the workaround: print
, trace
, et al don't get written to the output file.
A very reasonable request, although one I probably won't get to for a little while.
In fact, what's the motivation for having the test in the output? Generally the output was meant to be parsed by an IDE (that's why it was written in the first place), and it occurs to me that sending to the test output there too would make things harder for that.
I'm now seeing this comment of yours, and I admit I don't fully remember my motivation for this ticket. If I gather correctly, it might have had to do with these issues:
Or maybe, it had to do with an experiment I was doing at the time with auto-committing with git on all changes of my files, and I wanted to persist ghcid output alongside, e.g.:
to be able to perfectly preserve and replay a development workflow with each exact step taken.
It's not a pressing or high priority issue for me since then, but if it's easy to add sometime later I think it makes sense to have this as an option (perhaps as a separate option from the IDE-friendly output).
When hspec fails, it writes the source location of the failed test to stdout. This would allow your IDE to jump directly to the failed assertion.
I've found a workaround for now:
Although it's not exactly ideal since hspec's
-o
redirects to the file, and it would be nice being able to see the results in the ghcid window in addition to writing to the file.I guess I can work around this side-effect of the workaround like this:
Although I wouldn't mind something like this being more supported either in ghcid, or perhaps in hspec.