michaelleeallen/mocha-junit-reporter

No output if mocha fails

pabloromeu opened this issue · 3 comments

Hi,

I have configured some projects using the reporter and it works perfectly when it does not fail any tests. It creates an XML report and everything works, but when it fails a test, it does not create the report so I do not receive the failing test.

I am using version 1.16.0, mocha 4.1.0 and chai 4.1.2.

That is confusing, we use this reporter on many projects and see plenty of XML reports with failed test cases. Can you provide a MCVE that reproduces the issue?

I have been investigating a bit and I think it could have something to do with this issue in mocha Async So as the tests do not finish it does not write the xml result file... I will try to create a failing sample and submit it

I have been investigating a bit and has nothing to do with the reporter. It has to do with Mocha and Chai. Just if someone gets here looking for a solution: this issue has the clue