Quantcast
Channel: Ionic Framework - Ionic Forum
Viewing all articles
Browse latest Browse all 48980

How to test the select component

$
0
0

Hey guys, I’m currently working on an ionic react project and I want to write unit test to a component containing IonSelect.

I’m using @testing-library/react as my testing library and the component rendered perfectly. But when I try to use IonBlur and IonFocus from @ionic/react-test-utils/dist/ionFireEvent or just click, it did not make any changes to it. I also tried to use the open function provided by the select component which works perfectly in my browser but when I ran it in my unit test, it says `open is not a function.

Need some help!

1 post - 1 participant

Read full topic


Viewing all articles
Browse latest Browse all 48980

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>