Skip to content

Commit 80a5df8

Browse files
committed
docs(setchecked): update setChecked docs to reflect async mode
1 parent bfb24df commit 80a5df8

File tree

4 files changed

+20
-12
lines changed

4 files changed

+20
-12
lines changed

docs/api/wrapper/setChecked.md

+5-3
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,11 @@ Sets checked value for input element of type checkbox or radio and updates `v-mo
1212
import { mount } from '@vue/test-utils'
1313
import Foo from './Foo.vue'
1414

15-
const wrapper = mount(Foo)
16-
const radioInput = wrapper.find('input[type="radio"]')
17-
radioInput.setChecked()
15+
test('setChecked demo', async () => {
16+
const wrapper = mount(Foo)
17+
const radioInput = wrapper.find('input[type="radio"]')
18+
await radioInput.setChecked()
19+
})
1820
```
1921

2022
- **Note:**

docs/ja/api/wrapper/setChecked.md

+5-3
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,11 @@ checkbox 型もしくは radio 型の input 要素の checked の値をセット
1111
import { mount } from '@vue/test-utils'
1212
import Foo from './Foo.vue'
1313

14-
const wrapper = mount(Foo)
15-
const radioInput = wrapper.find('input[type="radio"]')
16-
radioInput.setChecked()
14+
test('setChecked demo', async () => {
15+
const wrapper = mount(Foo)
16+
const radioInput = wrapper.find('input[type="radio"]')
17+
await radioInput.setChecked()
18+
})
1719
```
1820

1921
- **注:**

docs/ru/api/wrapper/setChecked.md

+5-3
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,11 @@
1212
import { mount } from '@vue/test-utils'
1313
import Foo from './Foo.vue'
1414

15-
const wrapper = mount(Foo)
16-
const radioInput = wrapper.find('input[type="radio"]')
17-
radioInput.setChecked()
15+
test('setChecked demo', async () => {
16+
const wrapper = mount(Foo)
17+
const radioInput = wrapper.find('input[type="radio"]')
18+
await radioInput.setChecked()
19+
})
1820
```
1921

2022
- **Примечание:**

docs/zh/api/wrapper/setChecked.md

+5-3
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,11 @@
1212
import { mount } from '@vue/test-utils'
1313
import Foo from './Foo.vue'
1414

15-
const wrapper = mount(Foo)
16-
const radioInput = wrapper.find('input[type="radio"]')
17-
radioInput.setChecked()
15+
test('setChecked demo', async () => {
16+
const wrapper = mount(Foo)
17+
const radioInput = wrapper.find('input[type="radio"]')
18+
await radioInput.setChecked()
19+
})
1820
```
1921

2022
- **注意:**

0 commit comments

Comments
 (0)