Skip to content

Commit

Permalink
Update testing-async-components.md (#1836)
Browse files Browse the repository at this point in the history
* Update testing-async-components.md

* Update testing-async-components.md
  • Loading branch information
sergeyBreslavets authored May 9, 2021
1 parent d11c41c commit d55f8f1
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion docs/ru/guides/testing-async-components.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,9 @@ export default {
```js
import { shallowMount } from '@vue/test-utils'
import Foo from './Foo'
jest.mock('axios')
jest.mock('axios', () => ({
get: Promise.resolve({ data: 'value' })
}))

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

0 comments on commit d55f8f1

Please sign in to comment.