emit events and test that the events were emitted
document events