Commit 58a8bbb9 authored by Natalia Tepluhina's avatar Natalia Tepluhina

Merge branch 'patch-58' into 'master'

Use mockResolvedValue when mocking $apollo.mutate in GraphQL docs

See merge request gitlab-org/gitlab!23478
parents 1b4930ed 7390c2d5
......@@ -312,7 +312,7 @@ function createComponent(props = {}) {
`ApolloMutation` component exposes `mutate` method via scoped slot. If we want to test this method, we need to add it to mocks:
```javascript
const mutate = jest.fn(() => Promise.resolve());
const mutate = jest.fn().mockResolvedValue();
const $apollo = {
mutate,
};
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment