use global events in js tests