setup.ts 353 B

1234567891011
  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: any = global;
  7. globalAny.shallow = Enzyme.shallow;
  8. globalAny.render = Enzyme.render;
  9. globalAny.mount = Enzyme.mount;