-
-
Notifications
You must be signed in to change notification settings - Fork 33.6k
Description
In web-platform-tests/wpt#10955 we are slightly changing the way in which bad base URLs are tested for the WHATWG URL API's canonical urltestdata.json file. I believe Node also makes use of that file and so might want to adapt.
Basically, we are removing the three tests that currently exist which test bad base URLs, in favor of the following:
In addition to testing that parsing
inputagainstbasegives the result, a test harness for theURLconstructor (or similar APIs) should additionally test the following pattern: iffailureis true, parsingabout:blankagainstbasemust give failure. This tests that the logic for converting base URLs into strings properly fails the whole parsing algorithm if the base URL cannot be parsed.
You can see an example of how to do this in jsdom/whatwg-url#116; probably Node.js will want to do something similar.