There was an error while loading. Please reload this page.
1 parent 99a038a commit dd46c49Copy full SHA for dd46c49
test/useAsync.test.ts
@@ -46,6 +46,9 @@ describe('useAync', () => {
46
expect(onError).not.toHaveBeenCalled();
47
});
48
49
+ // Test added because Jest mocks can return promises that arre not instances of Promises
50
+ // This test ensures better testability of user code
51
+ // See https://github.com/slorber/react-async-hook/issues/24
52
it('should resolve a successful Jest mocked resolved value', async () => {
53
const onSuccess = jest.fn();
54
const onError = jest.fn();
0 commit comments