Question · JavaScript and React course · Module 13: Testing React

findBy queries in RTL

What are findBy queries used for in React Testing Library?

Answer options

  • Searching the DOM tree, including the shadow DOM
  • Searching elements by index in an array of components
  • Searching elements hidden with CSS display: none
  • Searching elements asynchronously - they wait for the element to appear

You can check the correct answer by solving this task in the CodeWorlds game.