This simply replicates the 'blanket:done' event coming out of phantomjs onto the listeners (which are runners). This is important because blanket runs **after** Mocha completes its run, and mocha fires the 'end' event to which the runners currently listen. If the runners listen for the 'end' event, then they cannot receive/parse the results of blanket, only mocha. Here's the order of events I see when we run our tests through grunt:

* start (once)
  * suite (per suite, may be nested)
    * pass/fail/pending (one of these per test)
    * test end (once per test)
  * suite end (per suite)
* end (once)
* blanket:fileDone (one per file)
* blanket:done (once)

I didn't replace the replicated 'end' event coming from mocha because I saw how grunt-blanket-mocha is dereferencing the 'mocha:*' events to emulate the same responses that grunt-mocha would normally produce. This could be replaced with the line:

    listeners[name].emit.call(listeners[name], 'end');

in which case the change to the listener near the bottom of this file (search for blanket:done) would no longer be needed, but it would then obscure the difference between end-of-mocha and end-of-blanket.