Closed Zakyyy closed 2 years ago
following up on this, I managed to pass the error by creating this mock file react-native-recaptcha-that-works.js inside mocks folder
import React from 'react';
import {View} from 'react-native';
const Recaptcha = props => <View {...props} />;
export default Recaptcha;
I added some tests to the Sample project, but I don't need any mock to make it work.
Here is how I implemented Recaptcha in my app
when I run npm test, I get the following error
React.createElement: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: object. You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.
Anyone was able to solve this issue or have a mock file for the package.