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

Adds url parse and removes the usage of anchor #288

Merged
merged 1 commit into from
Feb 6, 2020

Conversation

eluciano11
Copy link
Contributor

@eluciano11 eluciano11 commented Feb 3, 2020

What changed and why

This PR replaces the usage of document to parse a URL with the library url-parse. By doing this Pretender can be used in environments that don't include the DOM such as React Native.

The work done here is based on this PR #267. Additionally I added a couple of fixes that @xg-wang requested.

The only review comments that are pending from the old PR are the following:
#267 (comment)
#267 (comment)

To solve the pending issues I originally thought of using the Karma launcher for IE but that won't work on a IE environment because we won't have an IE binary. I was thinking that we could use SauceLabs or BrowserStack to run the tests on different browsers.

I would appreciate it if @xg-wang or @samselikoff would share their thoughts on how the IE issue could be solved. If we decide to go with SauceLabs we can request an Open Source Account.

Updates url parse import name

Updates dependencies on package.json
@samselikoff
Copy link
Contributor

@eluciano11 thanks so much for jumping on this!!

@xg-wang Can we go ahead and merge this, and deal with the IE testing later? Since we don't have IE test coverage for the rest of Pretender I don't think it should be a blocker for this PR.

@eluciano11
Copy link
Contributor Author

@samselikoff no problem, happy to help!

Copy link
Member

@xg-wang xg-wang left a comment

Choose a reason for hiding this comment

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

Thanks @eluciano11 the change looks good!
url-parse has cross-browser testing coverage I agree it's not a blocker for this PR.

@xg-wang
Copy link
Member

xg-wang commented Feb 6, 2020

Hi @eluciano11 is this still draft or it's ready be merged?

@eluciano11 eluciano11 marked this pull request as ready for review February 6, 2020 01:29
@eluciano11
Copy link
Contributor Author

@xg-wang should be good to go!

@samselikoff samselikoff merged commit 4974f98 into pretenderjs:master Feb 6, 2020
@samselikoff
Copy link
Contributor

Awesome, thanks again!

We can take care of ie coverage elsewhere.

@eluciano11
Copy link
Contributor Author

Np, sounds good!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants