Using an event handler was the only way I could find to ensure that the test occurred after all the events had been handled.

The "test:ready" event is fired at the end of the test, after all the "backgrid:selected" events. This ensures that the "test:ready" event is pushed onto the end of the event queue. As a result, all the "backgrid:selected" events are completely handled before the expect() function is executed. If we were to run the expect() call at the location that "test:ready" is triggered, the test will fail because all the "backgrid:selected" events have not been completely handled.

 I noticed that some other tests that try to test the state of the header cell use something like (line 127):
<code>
expect(cell.$el.find(":checkbox").prop("checked"), false);
</code>
but when I tried this I noticed that changing the boolean from false to true would not make the test fail because expect needs a .toBe() statement associated with each expect().