-
Notifications
You must be signed in to change notification settings - Fork 93
Report on failures after test complete. #237
base: master
Are you sure you want to change the base?
Conversation
The only concern that I have for now is that the reporters would receive two events for a single spec. The first one of a success and the subsequent one, contradicting the first, of a failure. I wanted to reproduce this but yak shaved on Mocha and ended up filing mochajs/mocha#4656. |
Maybe we should hold the temporary |
I've checked how Mocha's built-in reporter does it and it uses More information about Mocha custom reporters: https://mochajs.org/api/tutorial-custom-reporter.html |
I gave the above approach a try and it seems to work as expected. The problem is that existing tests are written to test the existing implementation and it's hard to say if this change will introduce any regressions. Unfortunately, I won't have time to invest a reasonable amount of time into this refactoring in the near future, so if somebody else wants to give it go, feel free to do so. The below spec:
with the (incomplete) adapter implementation:
results in the below output
|
@samouri, will you get a chance to rearrange the logic so that the adapter reports on |
Would this be considered a breaking change / major version bump? |
I think it should at most be a minor bump as we are not introducing a backwards incompatible change. |
summary
Fixes #236
Note: I am extremely unfamiliar with this repo, feel free to be harsh in your review.