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
When you use `mount`, a `VueWrapper` is returned with a number of useful methods for testing. A `VueWrapper` is a thin wrapper around your component instance. Methods like `find` return a `DOMWrapper`, which is a thin wrapper around the DOM nodes in your component and it's children. Both implement a similar same API.
@@ -288,7 +335,7 @@ Similar to `find`, but instead returns an array of `DOMWrapper`.
288
335
```vue
289
336
<template>
290
337
<div>
291
-
<span
338
+
<span
292
339
v-for="number in [1, 2, 3]"
293
340
:key="number"
294
341
data-test="number"
@@ -431,8 +478,8 @@ export default {
431
478
test('emitted', () => {
432
479
constwrapper=mount(Component)
433
480
434
-
console.log(wrapper.emitted())
435
-
// {
481
+
console.log(wrapper.emitted())
482
+
// {
436
483
// greet: [ ['hello'], ['goodbye'] ]
437
484
// }
438
485
@@ -444,10 +491,10 @@ test('emitted', () => {
444
491
### `setValue`
445
492
446
493
Sets a value on DOM element, including:
447
-
-`<input>` (either `type="checkbox" or `type="radio"`)
494
+
-`<input>` (either `type="checkbox"` or `type="radio"`)
448
495
-`<select>`
449
496
450
-
Since this will often result in a DOM re-render, `setValue` returns `Vue.nextTick`, so you will often have to call this with `await` to ensure the DOM has been updated before making an assertion.
497
+
Since this will often result in a DOM re-render, `setValue` returns `Vue.nextTick`, so you will often have to call this with `await` to ensure the DOM has been updated before making an assertion.
0 commit comments