This repository was archived by the owner on Jul 30, 2020. It is now read-only.

Description
react-native
native-testing-library version: 5.0.1
jest-preset: @testing-library/react-native
react-native version: 16.12.0
node version: 11
Relevant code or config:
const button = await findByTestId('button-id');
fireEvent.press(button);
const button = getByTestId('button-id');
fireEvent.press(button);
What you did:
Hi, I am trying to use the find* methods to attempt to wait for an element to appear. The second block works but the first one doesn't. Shouldn't both be equivalent?
What happened:
I got the error here: : Timeout - Async callback was not invoked within the 5000ms timeout specified by jest.setTimeout.Timeout - Async callback was not invoked within the 5000ms timeout specified by jest.setTimeout.Error:
Reproduction:
In fact, I wasn't able to run the async method in the README - I get this error:

Problem description:
Both methods should work similarly because the Promise in the find implementation should resolve once the get* returns true
Can you help us fix this issue by submitting a pull request?
I can try if I have a direction how to fix this!