I have a v-if rendering in my component that is link to a ref in the setup method. How can I test the rendrering in my testing script. Example:
In the component:
<div v-if="isCovid" class="covid"/>
setup() {
const isCovid = ref(true);
}
In the test component (I try this but dont work, the test received true):
it('do not render covid waring when its false', () => {
const wrapper = mount(TicketHeader,{
data(){
return { isCovid: false}
}
});
expect(wrapper.find('.covid').exists()).toBe(false)
});