Skip to content

cherry-pick(Reanimated): Stop passing nativeID to component in jest unit tests#8954

Open
MatiPl01 wants to merge 1 commit into4.2-stablefrom
@matipl01/cherry-pick/dont-pass-nativeID-in-jest-tests
Open

cherry-pick(Reanimated): Stop passing nativeID to component in jest unit tests#8954
MatiPl01 wants to merge 1 commit into4.2-stablefrom
@matipl01/cherry-pick/dont-pass-nativeID-in-jest-tests

Conversation

@MatiPl01
Copy link
Member

Cherry-pick of the #8881

## Summary

This PR fixes a regression between Reanimated `v4` and `v3`. In `v3`,
there was the following conditional assignment of the `nativeID`:

```tsx
const nativeID =
        skipEntering || !isFabric() ? undefined : `${this.reanimatedID}`
```

Since the `isFabric()` always returns `false`, `nativeID` is always
`undefined`, so the `nativeID` was never passed to the component in jest
unit tests.

In the `v4` we removed the `isFabric()` check, so the `nativeID` started
being passed the value of the `this.reanimatedID` property in jest unit
tests.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant