Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support relative request URLs #34

Merged
merged 3 commits into from
Nov 7, 2024
Merged

Support relative request URLs #34

merged 3 commits into from
Nov 7, 2024

Conversation

IanVS
Copy link
Owner

@IanVS IanVS commented Nov 7, 2024

Fixes #31

This takes an approach similar to MSW, whereby we will add the absolute base url to a request if we're able to. See https://developer.mozilla.org/en-US/docs/Web/API/Window/fetch#resource for which absolute base url is used in window vs worker contexts.

Copy link
Collaborator

@dirkluijk dirkluijk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me! Thanks for taking this one over, had some draft ideas but looking at your solution I probably wasn't on the right track.

@dirkluijk dirkluijk self-requested a review November 7, 2024 14:17
@IanVS IanVS merged commit b0295c8 into main Nov 7, 2024
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Not possible to mock relative paths after upgrading to 0.4.x
2 participants