Created
April 18, 2022 15:47
-
-
Save enzzoperez/f1cc1b3da874c33fc9b6e5fb6d752570 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
describe('Testing uses cases for async hook', () => { | |
it('', async () => { | |
const mock = new MockAdapter(axios); | |
mock.onGet().reply(200, {data: []}); | |
const {result, waitForNextUpdate} = renderHook( | |
({url}) => useRemoteData({url}), | |
{ | |
initialProps: { | |
url: '', | |
}, | |
}, | |
); | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment