Skip to content
This repository has been archived by the owner on Sep 8, 2021. It is now read-only.

fix(tests): fix reanimated mock.js with patch-package #1

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

tcodes0
Copy link

@tcodes0 tcodes0 commented Mar 3, 2020

I think this was a problem with mock.js distributed in react-native-reanimated. The noop type returned void so it was breaking some mocked functions that actually didn't return void but instead wanted an Animatedvalue. I figured this looking at the stack trace and then the types. And the call mock, I have no idea, I just applied a noop to it because it seems to do something fairly mockable like call a callback.

Screen Shot 2020-03-03 at 12 43 41 AM

@lucianomlima
Copy link
Owner

I did test with patch package and works. I'll try with our project here to understand if this is the only step or if there is another package causing the error. Thanks!

@tcodes0
Copy link
Author

tcodes0 commented Mar 9, 2020

Nice!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants