Skip to content

[v4] Jest tests don't run (included a minimal reproduction) #932

Open
@gersomvg

Description

@gersomvg

Bug

I have a bigger project that uses this library quite heavily, but when including it in our jest testing suite I run into all kinds of errors.

I've made a minimal reproduction here: https://github.com/gersomvg/bug-bottom-sheet-jest

The error that I run into there isn't exactly the same as the one I have in the bigger project, but I suspect they are related.

It looks like @gorhom/bottom-sheet doesn't play nicely with gesture-handler and reanimated mocks.

image

Environment info

Library Version
@gorhom/bottom-sheet 4.2.2
react-native 17.0.2
react-native-reanimated 2.8.0
react-native-gesture-handler 2.4.1 (tried 1.10.3 as well)

Steps To Reproduce

  1. Clone this repo: https://github.com/gersomvg/bug-bottom-sheet-jest
  2. Follow the three steps in the readme

Describe what you expected to happen:

  1. The tests run without error

Reproducible sample code

https://github.com/gersomvg/bug-bottom-sheet-jest

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingv4Written in Reanimated v2

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions