setup.js 348 B

123456789
  1. import * as Enzyme from 'enzyme';
  2. import * as Adapter from 'enzyme-adapter-react-16';
  3. Enzyme.configure({ adapter: new Adapter() });
  4. // Cast global to any type so TS compilation doesn't complain about missing
  5. // property
  6. const globalAny = global;
  7. globalAny.shallow = Enzyme.shallow;
  8. globalAny.render = Enzyme.render;
  9. globalAny.mount = Enzyme.mount;