Skip to content

feature/unit-tests #2

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 6 commits into from
Jun 15, 2025
Merged

feature/unit-tests #2

merged 6 commits into from
Jun 15, 2025

Conversation

johelder
Copy link
Owner

@johelder johelder commented Jun 15, 2025

add unit tests to core functionalities

johelder added 6 commits May 28, 2025 00:15
- add @testing-library/react-native and eslint-plugin-testing-library as dev dependencies
- configure eslint to use testing-library plugin for test files
- update react-native-builder-bob to latest version
- add react-test-renderer as dev dependency
- add test case to ensure caret is not rendered when caretHidden is true
- add testID to Caret component for easier testing
…g tests

- refactor render function to destructure props with default maxLength
- add test to verify slots rendered match maxLength prop
- add testID to TextInputOTPSlot component for easier testing
- improve existing test descriptions for clarity
removed unnecessary async keyword from the test case that checks
if the component renders slots up to the maxLength prop
…g tests

- add test case for setValue method
- update renderTextInputOTP function
- import act and createRef
- add onFilled callback in setValue method
- add test case to verify that the clear function clears input text when called programmatically
- ensure that the cleared text is not visible in the component after calling clear
@johelder johelder merged commit e7f0de1 into main Jun 15, 2025
5 checks passed
@johelder johelder deleted the feature/unit-tests branch June 15, 2025 22:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant