Test hooks on “keyboardDidShow” in React Native Functional Component

Update 01/05/2021

Updated testing code using @testing-library/react-native
Source code for the sample component

Tricky Part I

Workaround for Tricky Part I

Testing code using enzyme and various mocking
{
keyboardDidShow: [Function: _keyboardDidShow],
keyboardDidHide: [Function: _keyboardDidHide]
}

Tricky Part II

Workaround for Tricky Part II

Other Tests

Conclusion

Hi, I am from the Earth. And you?