In onComponentDidMount I'm adding a listener to handle Android back navigation and would like to add tests around it's behaviour, but need a way to simulate clicking the back button.
onComponentDidMount () {
BackHandler.addEventListener('hardwareBackPress', () => {...})
}
Aucun commentaire:
Enregistrer un commentaire