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

fix: Improve support for relative URLs #78

Merged
merged 3 commits into from
Jul 25, 2018
Merged

Conversation

offirgolan
Copy link
Collaborator

- Create a shared parseUrl utility that will make sure to match the provided URL string to a url-parse instance
- Support for protocol-relative URLs (Resolves #76)
@offirgolan offirgolan requested a review from jasonmit July 24, 2018 21:06
'//netflix.com/movies/1',
'http://netflix.com/movies/1',
'http://netflix.com/movies/1?sort=title&dir=asc'
].forEach(url => expect(parseUrl(url).href).to.equal(url));
Copy link
Contributor

@jasonmit jasonmit Jul 25, 2018

Choose a reason for hiding this comment

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

Can you add a test for the true argument that we're passing into parseUrl in a few places. Wasn't really sure how it was being used.

@offirgolan offirgolan merged commit 2c0083e into master Jul 25, 2018
@offirgolan offirgolan deleted the protocol-relative-urls branch July 25, 2018 20:47
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.

2 participants