SHARE
TWEET

Untitled

a guest Jul 17th, 2019 68 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. import ReactEventListener from "react-event-listener";
  2.  
  3. jest.mock("react-event-listener", () => props => (
  4.     <div {...props}>ReactEventListener</div>
  5. ));
  6.  
  7. ReactEventListener.withOptions = () => {};
  8.      
  9. const mockReactEvenetListener = props => (
  10.     <div {...props}>ReactEventListener</div>
  11. );
  12.  
  13. jest.mock('react-event-listener', () => ({
  14.     __esModule: true,
  15.     withOptions: () => {},
  16.     default: mockReactEvenetListener
  17. }));
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top