We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6e1b0e9 commit a77a8f5Copy full SHA for a77a8f5
src/__tests__/fetch.js
@@ -29,11 +29,7 @@ class Fetch extends React.Component {
29
30
test('Fetch makes an API call and displays the greeting when load-greeting is clicked', async () => {
31
// Arrange
32
- axiosMock.get.mockImplementationOnce(() =>
33
- Promise.resolve({
34
- data: {greeting: 'hello there'},
35
- }),
36
- )
+ axiosMock.get.mockResolvedValueOnce({data: {greeting: 'hello there'}})
37
const url = '/greeting'
38
const {container, getByText} = render(<Fetch url={url} />)
39
0 commit comments