0👍
On your test, you are setting your state showModal to true:
beforeEach(() => {
state = {
showModal: true
}
...
})
So your overlay is rendered and that is why your test conditions resolves as true.
<div ref="modal" class="modal-overlay"
v-if="isShow"
@click="close">
</div>
enter code here
Your ‘isShow’ computed value is point to the showModal = true on your test.
- [Vuejs]-Why isnt vue-chartjs receiving data from api?
- [Vuejs]-JHipster Vue: Where to modify the base URL for calling the backend
Source:stackexchange.com