diff --git a/README.md b/README.md index 0a66409f..6bf794a8 100644 --- a/README.md +++ b/README.md @@ -130,11 +130,7 @@ import Fetch from '../fetch' // see the tests for a full implementation test('Fetch makes an API call and displays the greeting when load-greeting is clicked', async () => { // Arrange - axiosMock.get.mockImplementationOnce(() => - Promise.resolve({ - data: {greeting: 'hello there'}, - }), - ) + axiosMock.get.mockResolvedValueOnce({ data: { greeting: 'hello there' } }) const url = '/greeting' const {getByText, getByTestId, container} = render()