-
Notifications
You must be signed in to change notification settings - Fork 52
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error Cannot read property 'getRandomBase64' of undefined when running test file #22
Comments
i'm getting this too. |
I was having this problem as well while using My import 'react-native-get-random-values'; Because my I ended up solving this by mocking out the function call for jest.mock('react-native-get-random-values', () => ({
getRandomBase64: jest.fn(),
})); |
@aav7fl thanks, mocking helped |
I was having the same problem. Mocked it a bit differently though.
|
I try use package uuid and react native get random values to create random uuid. Everything is fine and working. But when I try run my test file using jest, and I get an error Cannot read property 'getRandomBase64' of undefined.
How to solve this error?
Thanks.
The text was updated successfully, but these errors were encountered: