fix useStatelessReducer tests
This commit is contained in:
@@ -33,11 +33,9 @@ describe('useStatelessReducer Hook', () => {
|
||||
|
||||
describe('useDispatch Hook', () => {
|
||||
it('Should throw when used outside of DispatchContext', () => {
|
||||
jest.spyOn(console, 'error').mockImplementation(() => {});
|
||||
expect(() => {
|
||||
renderHook(() => useDispatch());
|
||||
}).toThrow();
|
||||
expect(console.error).toHaveBeenCalled();
|
||||
});
|
||||
|
||||
it('Should return a dispatch function', () => {
|
||||
|
||||
Reference in New Issue
Block a user