You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jul 30, 2020. It is now read-only.
Calling fireEvent.press on a button my component, that calls the onPress() callback I posted above.
When running normally on the browser, pressing the button logs "Measure called ....".
What happened:
The measure callback is not invoked, even though the measure method is being called.
Problem description:
My project relies on measure to trigger some user-facing behavior.
Suggested solution:
Too new to React Native and JS in general :/
Can you help us fix this issue by submitting a pull request?
Sure, with some guidance.
EDIT:
I ended up mocking the method myself with the following code, but I was hoping this was not necessary with the native-testing-library preset.
Uh oh!
There was an error while loading. Please reload this page.
react-native
orexpo
: expo 37.0.3native-testing-library
version: 5.0.3jest-preset
: @testing-library/react-native/jest-presetreact-native
version: 37.0.1node
version: 14.2.0Relevant code or config:
What you did:
Calling
fireEvent.press
on a button my component, that calls the onPress() callback I posted above.When running normally on the browser, pressing the button logs "Measure called ....".
What happened:
The
measure
callback is not invoked, even though the measure method is being called.Problem description:
My project relies on measure to trigger some user-facing behavior.
Suggested solution:
Too new to React Native and JS in general :/
Can you help us fix this issue by submitting a pull request?
Sure, with some guidance.
EDIT:
I ended up mocking the method myself with the following code, but I was hoping this was not necessary with the native-testing-library preset.
jest.spyOn(View.prototype, 'measureInWindow').mockImplementation((cb) => cb(0, 0, 1, 1));
The text was updated successfully, but these errors were encountered: