We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 226c306 commit 6e1b0e9Copy full SHA for 6e1b0e9
README.md
@@ -130,11 +130,7 @@ import Fetch from '../fetch' // see the tests for a full implementation
130
131
test('Fetch makes an API call and displays the greeting when load-greeting is clicked', async () => {
132
// Arrange
133
- axiosMock.get.mockImplementationOnce(() =>
134
- Promise.resolve({
135
- data: {greeting: 'hello there'},
136
- }),
137
- )
+ axiosMock.get.mockResolvedValueOnce({ data: { greeting: 'hello there' } })
138
const url = '/greeting'
139
const {getByText, getByTestId, container} = render(<Fetch url={url} />)
140
0 commit comments