You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1581,7 +1581,7 @@ And everything works fine again.
1581
1581
1582
1582
## Testing v-model
1583
1583
1584
-
Let's test a custom component with `v-model` support, e.g. like this one:
1584
+
Let's test a custom component with `v-model` support, like this one:
1585
1585
1586
1586
```html
1587
1587
<divclass="c-checkbox">
@@ -1627,7 +1627,7 @@ We can use this component in any form:
1627
1627
<my-checkboxv-model="value"></my-checkbox>
1628
1628
```
1629
1629
1630
-
If the component doesn't have `v-model` we can do all test just using `mount(MyCheckbox, { ... })`, but unfortunately, the component supports `v-model` and there is no way how model can be passed to the `mount()`. What we have to do is to create another component which uses the component under the test inside its template. The wrapper can also provide a value which will be passed to the v-model and which will be updated:
1630
+
If the component doesn't have `v-model`, we can test it using:`mount(MyCheckbox, { ... })`. Unfortunately, the component supports `v-model` and there is no way to pass in the model through `mount()`. What we have to do is to create another component which uses the component under the test inside its template. The wrapper can provide a value to pass in the `v-model` value, which will be updated as expected:
0 commit comments