Hi !
Are there any guides about how to setup this with jest ?
A simple example with Picker causes the following error:
Warning: Function components cannot be given refs. Attempts to access this ref will fail. Did you mean to use React.forwardRef()?
Check the render method of `Picker`.
I figured this happens because in my setup file, I mock the platform (for other tests purposes):
EDIT:
I had to put Platform.OS = 'ios' before the render in my test file for this to work.
Still means there's an issue with Platform=android & jest :/
Hi ! Are there any guides about how to setup this with jest ? A simple example with Picker causes the following error:
I figured this happens because in my setup file, I mock the platform (for other tests purposes):
Any ideas ?
EDIT: I had to put
Platform.OS = 'ios'
before the render in my test file for this to work. Still means there's an issue with Platform=android & jest :/