how to mock GoogleSignin.isSignedIn() in detox

Viewed 95

PLease help me to mock the function await GoogleSignin.isSignedIn() using detox for react native app

export const getCurrentUserInfo = async (userType) => {
  try {
    let userInfo;
    let isSignedIn = await GoogleSignin.isSignedIn();
    if (!!isSignedIn)
      userInfo = await GoogleSignin.signInSilently();
    else
      userInfo = await GoogleSignin.signIn();
   .....
};```
How to mock these functions and how to do testing in react-native using detox
0 Answers
Related