You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Thanks for reporting the issue! You mention a fork, are there any changes in that fork that aren't in master? I'm going to dig into this and see what I can find.
It appears that this issue is related to #347 (and subsequently is being worked on in #348) and boils down to RTL not playing nice with the dynamic import that supports phone validation. Work is underway to remedy that, in the meantime, having an import for libphonenumber-js-utils in your test file should remove the asynchronousness of the import and allow your test to behave as if the validation was already ready. You can use this technique as a temporary workaround while the dynamic import is either being removed or handled better.
I am facing this same issue, phone number validation never passes. The issue came up when migrating my existing project from CRA to Vite. The workaround causes another error message: Uncaught TypeError: Cannot use 'in' operator to search for 'intlTelInputUtils' in undefined.
I can do a minimal reproduction of the problem (if someone is maintaining this project). With my previous CRA-installation, the input worked fine.
This spec in my own project fails while it should pass. When I implement an equivalent spec in a fork of your react-int-tel-input project, it passes:
The text was updated successfully, but these errors were encountered: