airportyh/testem — pull request #324 by kotas (2013-11-29 11:41:06+00:00)
Title: Fix mocha adapter not reporting all test results

I'm using testem with mocha, and noticed that sometimes `testem ci` outputs a report with lack of some test results. (ex. Although the spec has 100 tests, testem's report only contains 90 results)

This is because, by commit 6c890dc, reporting test result is delayed by `setTimeout` asynchronously, which may cause inconsistent order of event emitting, such as `test-result` event after `all-test-results` event.

This PR fixes the inconsistency and always emitting `all-test-results` event after all of `test-result` events have been fired, so that reporters can finalize their report properly.