Skip to content

Conversation

@ataylorme
Copy link
Contributor

Addresses #25 by replacing one or more trailing slashes in referenceUrl with a single trailing slash.

@danreeves
Copy link
Member

danreeves commented Nov 17, 2017

This doesn't solve the issue I had where the URL has a trailing slash and so does the referenceUrl, resulting in two slashes at the end of the domain. Right?

I think it was a mistake on my part to hack around this with a regex. I'd rather fix the url we're placing in the currentScenario with normalize-url. e.g.http://requirebin.com/?gist=b34c314281156c23c0e21dc2dd970c4b

@ataylorme
Copy link
Contributor Author

@danreeves makes sense to me. I think we will have to be careful as removeTrailingSlash says Note: Trailing slash is always removed if the URL doesn't have a pathname.

This means http://test.com/////// will turn into http://test.com, so we will need to add a trailing slash back.

@danreeves
Copy link
Member

If we do at the point where we have the full url, before https://github.com/fffunction/backstop-crawl/blob/master/lib/crawl.js#L116 it should be fine.

@coveralls
Copy link

coveralls commented Nov 17, 2017

Coverage Status

Coverage remained the same at 100.0% when pulling 6d15dba on ataylorme:missing-reference-url-slash into e6ecdd8 on fffunction:master.

@ataylorme
Copy link
Contributor Author

@danreeves should be all set now. Thanks for talking through this with me!

@danreeves danreeves merged commit e260967 into fffunction:master Nov 17, 2017
@ataylorme ataylorme deleted the missing-reference-url-slash branch November 17, 2017 18:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants