add test for pre_event