Skip to content

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