Is it your position (and that of the tests) that a URL that is not currently registered, or a URL that is missing an http:// prefix, should be considered “invalid”?
The project accepts URLs without common prefixes, such as www.google.com or even google.com|EDIT|Not requiring an http:// prefix should not be a problem, as the tests submit several non-prefixed URLs that are expected to be shortened.
The project produces a new short URL each time I enter the same original URL, rather than returning the existing short URL. (I thought this was a test case, but I don’t see it on the assignment page now)
When I attempt to visit a short URL for a link that does not include the http:// prefix, I get the following error:
This page isn’t working
boilerplate-project-urlshortener.martinian.repl.co redirected you too many times.
Try clearing your cookies.
ERR_TOO_MANY_REDIRECTS
|EDIT|
The key issue seems to be that your URL shortener cannot handle anything other than a domain name. It will reject a URL like https://www.reddit.com/r/tea/ or boilerplate-project-urlshortener.martinian.repl.co/?v=1667184004712, which is one of the URLs that may be submitted by the test.
Yeah I am aware it is not the best practice. I decided to use an array just to focus on the logic of the project itself. I’m now starting the Excercise Tracker where I will implement a Mongo DB.