Skip to content

Commit

Permalink
docs: use preformatted styling for a code example (#10486)
Browse files Browse the repository at this point in the history
  • Loading branch information
wojtuch committed Sep 7, 2020
1 parent 521cd09 commit bc0eed4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion docs/MockFunctions.md
Expand Up @@ -130,7 +130,7 @@ export default Users;

Now, in order to test this method without actually hitting the API (and thus creating slow and fragile tests), we can use the `jest.mock(...)` function to automatically mock the axios module.

Once we mock the module we can provide a `mockResolvedValue` for `.get` that returns the data we want our test to assert against. In effect, we are saying that we want axios.get('/users.json') to return a fake response.
Once we mock the module we can provide a `mockResolvedValue` for `.get` that returns the data we want our test to assert against. In effect, we are saying that we want `axios.get('/users.json')` to return a fake response.

```js
// users.test.js
Expand Down

0 comments on commit bc0eed4

Please sign in to comment.