Skip to content

Commit d55f8f1

Browse files
Update testing-async-components.md (#1836)
* Update testing-async-components.md * Update testing-async-components.md
1 parent d11c41c commit d55f8f1

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

docs/ru/guides/testing-async-components.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,9 @@ export default {
4444
```js
4545
import { shallowMount } from '@vue/test-utils'
4646
import Foo from './Foo'
47-
jest.mock('axios')
47+
jest.mock('axios', () => ({
48+
get: Promise.resolve({ data: 'value' })
49+
}))
4850

4951
it('делает асинхронный запрос при нажатии кнопки', () => {
5052
const wrapper = shallowMount(Foo)

0 commit comments

Comments
 (0)