In the only place you use this event, you end the test without waiting callback to complete. This is dangerous. If you don't need callback execution, simply stub `waitForDOMMessagehandler()` to call your `onDOMReady()` callback and that's all.

If you need to wait for `callback()` to finish, stub `waitForDOMMessagehandler()` again but with something like:
```javascript
sinon.stub(mock, 'waitForDOMAndMessageHandler', function (window, callback) {
  callback();
  yourDoneFunction();
})
```