kirillzyusko / react-native-keyboard-controller

Keyboard manager which works in identical way on both iOS and Android
https://kirillzyusko.github.io/react-native-keyboard-controller/
MIT License
1.54k stars 61 forks source link

tests: FocusedInputHolder (Android) #370

Closed kirillzyusko closed 6 months ago

kirillzyusko commented 6 months ago

📜 Description

Added tests to FocusedInputHolder. Refactored code, reduced duplications, aligned to JS-based namings.

💡 Motivation and Context

I decided to fully cover a new functionality with unit tests. The ViewHierarchyTraversal was already covered, so I decided to cover other classes. The next one FocusedInputHolder. This is a very simple class, so it contains two unit tests:

Along with that I did some refactoring: reduced code fragmentation, reduced code duplication, aligned API to look similar to RN JS API (and hide internals).

📢 Changelog

iOS

Android

🤔 How Has This Been Tested?

Tested via CI.

📝 Checklist

github-actions[bot] commented 6 months ago

📊 Package size report

Current size Target Size Difference
134695 bytes 134361 bytes 334 bytes 📈