You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
doc(queryconfig): Allows configuring a different element query mechanism
Provides the ability to specify a different element query mechanism other than querySelector and querySelectorAll.
An example of the usage with Georgegriff/query-selector-shadow-dom looks like this:
import { querySelectorAllDeep, querySelectorDeep } from 'query-selector-shadow-dom';
configure({
queryElement: querySelectorDeep,
queryAllElements: querySelectorAllDeep,
})
After this line, a query will also drill into the shadow dom of elements on the page
Why:
In our project, we are using a design system build with web components
(via stenciljs), and different projects in different frameworks (lit,
react, vue) want to use this library. The corresponding pr can be found
here:
testing-library/dom-testing-library#1054
0 commit comments