Как имитировать / тестировать метод NativeModules.EncryptPassword.encryptPassword и метод мутации login () внутри NativeModules
**
**const LoginPage = ({navigation, ...props}) => { const [login, {loading, error}] = useMutation(Queries.GET_USER_LOGIN) return (
<TouchableOpacity style={styles.login} onPress={()=> { NativeModules.EncryptPassword.encryptPassword( values.password, (value) => { console.log("NativeModules encryptPassword is " + value) encrypPassword = value; let json = { Email: 'test@gmail.com', Password: encrypPassword, }; login({ variables: { input:
json, }, }); }) }} >
<Text> Login </Text>
</TouchableOpacity>**
**