-
-
Notifications
You must be signed in to change notification settings - Fork 14
Closed
Description
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 the LocationProvider:
render(
<LocationProvider url="/some/path">
<My Component />
</LocationProvider>
);
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?
Metadata
Metadata
Assignees
Labels
No labels