Closed RyanBard closed 5 years ago
You can see it by adding the following test cases:
t.is(normalizeUrl('http://sindresorhus.com:5000///foo'), 'http://sindresorhus.com:5000/foo'); // passes t.is(normalizeUrl('http://sindresorhus.com///foo'), 'http://sindresorhus.com/foo'); // passes t.is(normalizeUrl('http://sindresorhus.com:5000//foo'), 'http://sindresorhus.com:5000/foo'); // fails - http://sindresorhus.com:5000//foo t.is(normalizeUrl('http://sindresorhus.com//foo'), 'http://sindresorhus.com/foo'); // fails - http://sindresorhus.com//foo
Hey @RyanBard, I stumbled onto the same issue you did. I pushed a fix at #78. Let me add your tests just to verify it fixes your issues as well.
Yep, added your tests and everything seems to pass.
You can see it by adding the following test cases: