Testing Library

The @testing-library family of packages helps you test UI components in a user-centric way.

You want to write maintainable tests that give you high confidence that your components are working for your users. As a part of this goal, you want your tests to avoid including implementation details so refactors of your components (changes to implementation but not functionality) don't break your tests and slow you and your team down.

Testing Library accomplish these goals so you can be confident your application will work when it gets to the end user.

23 results
found for "
*
"

Search Results

An Introduction to the React Testing Library

course by Daniel Afonso

Get Rid of the "not wrapped in act(...)" Warning

lesson by Daniel Afonso

Use the waitForElementToBeRemoved Async Util to Await Until an Element Disappears

lesson by Daniel Afonso

Leverage the waitFor Async Util to Await for an Assertion to Pass

lesson by Daniel Afonso

Simulate All User Interactions With an Element by Using the user-event Library

lesson by Daniel Afonso

Fire a Single Event on an Element Using fireEvent

lesson by Daniel Afonso

Use the Testing Playground to Help Decide Which Query to Pick

lesson by Daniel Afonso

Check to Current Way Your Component Looks Using Debug

lesson by Daniel Afonso

Use the Screen Object to Avoid Query Destructuring From Render

lesson by Daniel Afonso

Constrain a Query to a Specific Element Using Within

lesson by Daniel Afonso

Get Elements With an Associated Test id Attribute Using the byTestId Query

lesson by Daniel Afonso

Get Elements With a Matching alt Text Attribute Using the byAltText Query

lesson by Daniel Afonso

Get Elements With a Matching Title Attribute Using the byTitle Query

lesson by Daniel Afonso

Get Elements With a Given Text Match Using the byText Query

lesson by Daniel Afonso

Get Elements With a Matching Display Value Using the byDisplayValue Query

lesson by Daniel Afonso

Get Elements With a Given Placeholder Text Using the byPlaceholderText Query

lesson by Daniel Afonso

Get Elements Associated With a Label Using the byLabelText Query

lesson by Daniel Afonso

Get Elements Exposed in the Accessibility Tree Using the byRole Query

lesson by Daniel Afonso

Use the AllBy variant to get Multiple Instances of an Element

lesson by Daniel Afonso

Use the findBy Query to get Elements that Will Show up on the Page

lesson by Daniel Afonso

Use the queryBy Query to get Elements that Won't Always be on the Page

lesson by Daniel Afonso