Combine the _onWindowClose tests into one for the event to test the result of the event and not the event and function separately.