Updated ErrorHandler so that it logs errors in production

This commit is contained in:
Alejandro Celaya
2019-03-05 14:04:52 +01:00
parent 43097b93e5
commit 701c143149
3 changed files with 11 additions and 3 deletions

View File

@@ -9,10 +9,11 @@ describe('<ErrorHandler />', () => {
reload: jest.fn(),
},
};
const console = { error: jest.fn() };
let wrapper;
beforeEach(() => {
const ErrorHandler = createErrorHandler(window);
const ErrorHandler = createErrorHandler(window, console);
wrapper = shallow(<ErrorHandler children={<span>Foo</span>} />);
});