How to Unit test an ion-toggle component

I have a component where I implement the ion-toggle component.

The component emits @ionChange and when triggered it calls my function like so:


It works great but I can’t find out how to unit test this. Not matter what I do it won’t trigger the emit ionChange and call my function.

If I change @ionChange to @click it works when I do.


But I can’t seem to make I work whit ionic custom events.

How do you guys do it?

I’m using jest the with vue3 composition api and typescript