Skip to content

Instantly share code, notes, and snippets.

@michelts
Created March 22, 2019 16:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save michelts/792cccb612862b9743ce7884a6a9439f to your computer and use it in GitHub Desktop.
Save michelts/792cccb612862b9743ce7884a6a9439f to your computer and use it in GitHub Desktop.
const [global, setGlobal] = useGlobal();
useGlobal.mockReturnValueOnce([mockedGlobal, jest.fn()]);
const reducerFunc = useGlobal('someReducerFunc');
useGlobal.mockReturnValueOnce(mockedReducerFunc);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment