Please, help with two-way binding test for QInput (Quasar 16, Jest, Vue)
Guys, can you, please advise what could be done here.
I have the following component I’d like to test (not as shallow)
I wanted to perform here the following tests:
- verify the event is emitted when I set the this.selectedValue (so to tests watcher)
- verify that this.selectedValue is changed to the value entered in embedded Qinput - as if some user enters something and manipulates the v-model.
I managed to write the first one but I’m really struggling with the second one.
I triggered a lot of different events but vm.vm.selectedValue just remained as it was recieved from props.
Can you please, give any insights how to see the selectedValue finally changed? (I also tried $nextTick but no luck)
Thank you in advance!
Sorry, the implementation of ‘@vue/test-utils’ specifies.
input.element.value = ‘other’
This seems to work.