http-status-check icon indicating copy to clipboard operation
http-status-check copied to clipboard

site.followRedirect needs unit tests

Open guyellis opened this issue 10 years ago • 3 comments

In uriCheck.js we set followRedirect to false. This should be configurable per site and default to false if missing which will allow for checking collections of shortUrls and their ultimate destinations.

guyellis avatar Oct 09 '14 13:10 guyellis

looking for a config based approach for the setting or do you just want it passed into the uriCheck module from the manager?

ckross01 avatar Oct 10 '14 13:10 ckross01

I'm thinking that it should be part of the site object that's passed into the checkUri() function. So when the options object is setup around lines 28 to 31 the followRedirect is set to !!site.followRedirect. That way everything should continue to function as usual but it can be set to true for any site in the samplesites.js or for all sites using the allSites object. Does that make sense?

guyellis avatar Oct 10 '14 15:10 guyellis

site.followRedirect has been added, however it needs unit tests. Probably using something like sinon to stub request.

guyellis avatar Oct 11 '14 06:10 guyellis