JavaScript URI functions – unit tests

This HTML document invokes a set of unit tests for JavaScript functions that resolve URI references to absolute form.

History:

Note: In Dec. 2011, when testing Nathan Rixham's library, I noticed I expect the "wrong" result when merging a relative path with a base URI consisting of just a scheme and a relative path (no leading "/"). This affects tests 2, 6, 7, and maybe 162.

When RFC 3986/STD 66 was in development, Graham Klyne reported this issue and suggested that the resolution algorithm be adjusted to provide a more reasonable result. There was no argument, so I made my absoluteizeURI() function and these unit tests with the expectation that the final draft of the URI spec would contain a fix for the issue. However, when RFC 3986 was finally published, there was no change to the resolution algorithm.

I finally got around to mentioning this on the URI WG list in Oct. 2012, in response to a post which indicated that there are more JavaScript libraries out there which I could add to this test harness.