Skip to content

Instantly share code, notes, and snippets.

@paigen11
Created March 28, 2020 20:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save paigen11/e61e4d648b17c710f2bb7814f4fae312 to your computer and use it in GitHub Desktop.
Save paigen11/e61e4d648b17c710f2bb7814f4fae312 to your computer and use it in GitHub Desktop.
Async example using waitForElement before searching the DOM for a button using React Testing Library
const orderButton = await waitForElement(() => container.getByTestId('order-submit-button'));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment