Skip to content

Conversation

@akwasniewski
Copy link
Contributor

@akwasniewski akwasniewski commented Dec 1, 2025

Description

Updates mocks to mock HostGestureDetector, and have a separate file for mocking buttons. Moreover it adds tests for correct error throws in V3.

Test plan

yarn test

@akwasniewski akwasniewski marked this pull request as ready for review December 2, 2025 10:15


jest.mock('./lib/commonjs/RNGestureHandlerModule', () =>
require('./lib/commonjs/mocks/mocks')
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  1. Can this be renamed from mocks?
  2. I don't think it should contain anything more than the module methods. The old gesture handlers, gesture-wrapped components, and host detector should be separate and mocked to the correct files, no?

I think the current setup dates back to the time when all of Gesture Handler was a single file, so it was correct to mock everything to a single file.

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.

3 participants