Turn Off Console Error Messages In A Test
it('renders a component without a required prop', () => {
const originalError = console.error;
console.error = jest.fn();
// test code here
expect(shallow(<My Component />)).toDoSomething;
console.error = originalError;
});Last updated