Is there a reason why this needs to be moved? This change makes the order of operation different between reject and resolve and potentially introduces backwards-incompatible changes to the order in which things occur (currently, `/test/fail` and `/test/end` publish, and then `afterEach` is called; this change makes it so `afterEach` is called, then `/test/fail` and `test/end` are published).