Replies: 2 comments
-
update: I've tried this too, no success: const event = userEvent.setup();
await event.longPress(getByText("Route 2"));
await waitFor(() => {
// Expect that onLongPress has been called with the correct arguments
expect(mockOnLongPress).toHaveBeenCalledWith({
navigation: mockNavigation,
targetKey: "route2", // Adjust the expected target key as needed
});
}); |
Beta Was this translation helpful? Give feedback.
0 replies
-
Hello @zilahir, the code you posted should work, I can't tell what could be the problem here, could you provide the full example? |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I have read the docs.
However, I am still unable to test this properly.
i tried this:
but in this case I don't know what should be the condition to check.
And I tried this too:
but this fails as well:
Any ideas what I am missing? Thank you!
Beta Was this translation helpful? Give feedback.
All reactions