websanova / js-url

url() - A simple, lightweight url parser for JavaScript
http://www.websanova.com
MIT License
1.93k stars 204 forks source link

Added tests for the path component RFC3986 section 3.3 that allows empty path #23

Closed bettiolo closed 11 years ago

bettiolo commented 11 years ago

Added tests for the path component RFC3986 section 3.3 that allows empty path.

Details: http://tools.ietf.org/html/rfc3986#section-3.3

websanova commented 11 years ago

I've written a simpler implementation for this. Really it's just appending the '/' for urls, so we only need to check for that. I've also just manually added your test cases. Thanks.

bettiolo commented 11 years ago

I found out that some tests were wrong, In some tests I was treating the authority as a resource, I have already fixed those tests on my branch

bettiolo commented 11 years ago

Created a pull request with this codebase to CDNJS: https://github.com/cdnjs/cdnjs/pull/1704