// Make Enzyme functions available in all test files without importing
import { shallow, render, mount } from 'enzyme';
import renderer from 'react-test-renderer';

global.shallow = shallow;
global.render = render;
global.mount = mount;
global.renderer = renderer;
global.should = require('chai').should();
global.expect = require('chai').expect;

// Fail tests on any warning
console.error = message => {
  throw new Error(message);
};
