string
object
Creates an object from the given url. If any property doesn’t exist in the provided url its value will be an empty string.
string
The url to parse
object
the parsed url object
parseUrl should return an object with a defined href property when a url is passed | Pass |
parseUrl should return an object with a defined searchParams property when url contains a single parameter | Pass |
parseUrl should return an object with a defined searchParams property when url contains multiple parameters | Pass |
parseUrl should return an object with an empty searchParams property when the url has no query string | Pass |
parseUrl should return an object with a defined hash property when a url is passed with a # | Pass |
parseUrl should return an object with an empty hash property when a url is passed without a # | Pass |
parseUrl should return an object with a defined query property when a url is passed with a query string | Pass |
parseUrl should return an object with an empty query property when a url is passed without a query string | Pass |
parseUrl should return an object with a correctly defined protocol property for http | Pass |
parseUrl should return an object with a correctly defined protocol property for https | Pass |
parseUrl should return an object with a correctly defined protocol property for ftp | Pass |
parseUrl should return an object with a correctly defined protocol property for file | Pass |
parseUrl should return an object with a default protocol of http if url does not contain a protocol | Pass |
parseUrl should return an object with properly formatted host when a url is passed with specific port | Pass |
parseUrl should return an object with properly formatted hostname when a url is passed with www | Pass |
parseUrl should return an object with properly formatted hostname when a url is passed without www | Pass |
parseUrl should return an object with a defined path property when a url is passed with a path | Pass |
parseUrl should return an object with an empty path property when a url is passed without a path | Pass |
parseUrl should return an object with an empty port property when a url is passed without a specified port | Pass |
parseUrl should return an object with an defined port property when a url is passed with a specified port | Pass |