Select to view content in your preferred language

React Testing Library - Query Calcite Components

646
0
01-24-2022 04:08 PM
JoshGore
Occasional Contributor

I've been working on a basic application that renders a list, with Jest / React Testing Library tests that use getByText / findByText queries to check that items in the list render. I'm now looking to refactor the UI to use the calcite-pick-list / calcite-pick-list-item React components. As these use the shadow DOM, they break my tests.

Just wondering if anyone has had any luck using something like testing-library__dom or any alternatives to test applications using the Calcite React wrapper library with Jest/React Testing Library?

0 Kudos
0 Replies