Adds url parse and removes the usage of anchor #288
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What changed and why
This PR replaces the usage of
document
to parse a URL with the libraryurl-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.