SHARE
TWEET

Untitled

a guest Jun 18th, 2019 75 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. const useMock : any = [(k: any) => k, {}];
  2. useMock.t = (k: any) => k;
  3. useMock.i18n = {};
  4.  
  5. jest.mock('react-i18next', () => ({
  6.   // this mock makes sure any components using the translate HoC receive the t function as a prop
  7.   /* tslint:disable-next-line:variable-name */
  8.   useTranslation: () => useMock,
  9. }));
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