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
Is your feature request related to a problem? Please describe.
While playing around with adding happy-dom to test suite for @testing-library/user-event, I noticed that a ton of errors where coming from the fact that happy-dom lacks XPath functionality.
I couldn't find any discussion about it here, decided to start one. I also recognise this might not align with package's goals.
Describe the solution you'd like
In order to facilitate better re-usability and this feature (XPath) being a standard, I think it would makes sense to create a separate package specifically for xpath implementation that could be re-used across projects. As a starting point we could take JSDom's implementation and add types. Eventually JSDOM could reuse same implementation should they choose to.
Describe alternatives you've considered
Could do this without involving happy-dom at all and just create the package and import it in both @testing-library/user-event and any projects that use happy-dom. But that's less than ideal.
Most implementations in Happy DOM follow standards, but as some functionality rely on internal logic inside the Happy DOM environment I have found that it is usually easier to just implement it inside Happy DOM to start with.
It seems like @testing-library@user-event is using the method document.evaluate(). This is probably the method that we need to implement to add support for it.
Do you have some examples of logic that you use with @testing-library/user-event that is currently failing? It can be a good start to write integration tests for it.
Is your feature request related to a problem? Please describe.
While playing around with adding
happy-dom
to test suite for@testing-library/user-event
, I noticed that a ton of errors where coming from the fact thathappy-dom
lacksXPath
functionality.I couldn't find any discussion about it here, decided to start one. I also recognise this might not align with package's goals.
Describe the solution you'd like
In order to facilitate better re-usability and this feature (XPath) being a standard, I think it would makes sense to create a separate package specifically for xpath implementation that could be re-used across projects. As a starting point we could take JSDom's implementation and add types. Eventually JSDOM could reuse same implementation should they choose to.
Describe alternatives you've considered
Could do this without involving happy-dom at all and just create the package and import it in both
@testing-library/user-event
and any projects that usehappy-dom
. But that's less than ideal.Additional context
https://developer.mozilla.org/en-US/docs/Web/XPath
The text was updated successfully, but these errors were encountered: