Skip to content

Conversation

@andrescalco
Copy link
Contributor

Was facing some errors while testing with jest and found this quick fix.

Update mock to fix the type error: `TypeError: Cannot read property ' __value' of undefined`
@andrescalco
Copy link
Contributor Author

Kudos to adrianolsk on helping me with this

@VannaDii
Copy link

This should resolve #614 and #622

@jgonet
Copy link
Member

jgonet commented Feb 27, 2020

Isn't that treating symptoms instead of a cause? In what cases getValue should return undefined?

@tcodes0
Copy link

tcodes0 commented Mar 3, 2020

Isn't that treating symptoms instead of a cause? In what cases getValue should return undefined?

☝️ mocks should follow the types. That's the cause of the bug I think.

@balzdur
Copy link

balzdur commented Mar 5, 2020

I agree with @Thomazella.

I think the approach described here is better lucianomlima/react-navigation-v4-examples#1

EDIT: Already mantionned here

@osdnk osdnk changed the title FIX TypeError: Cannot read property ' __value' of undefined fix TypeError: Cannot read property ' __value' of undefined Mar 13, 2020
@osdnk osdnk merged commit 9f5f224 into software-mansion:master Mar 13, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants