From 241588a08edadbcaef7cc93bb11aad3b9cbad73b Mon Sep 17 00:00:00 2001 From: Roman Ponomarev Date: Mon, 4 Jun 2018 14:26:51 +0300 Subject: [PATCH] Update MockFunctions.md (#6386) --- docs/MockFunctions.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/MockFunctions.md b/docs/MockFunctions.md index 5e3306279970..facd8dbca6ba 100644 --- a/docs/MockFunctions.md +++ b/docs/MockFunctions.md @@ -133,7 +133,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 `mockReturnValue` 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