Closed florianeckerstorfer closed 2 weeks ago
Not missing; it was hastily added and the prop doesn't fully work. It'll be removed entirely in the next version.
Instead, patch globalThis.location
, it's far more robust and ensures better compatibility with components.
I need to publish a new version of iso, but for the meantime, you can just copy/paste this.
Thanks for the response, works like a charm.
Utility is available in 2.7.0
@rschristian Wow, that was fast. Thank you ❤️
No prob, should've gotten that out sooner tbh! Glad it helps though
I'm trying to test a component that uses
useLocation
with @testing-library/preact and I found no information in the docs on how to mock the location. After looking through the source code I figured out I can just provide the URL to theLocationProvider
:However, since
url
is missing from the Typescript type I get an TypeError in my code. Is there a reason why the prop is missing from the type or should it be added?