add base URL canonicalization test

This commit is contained in:
Florian Dold 2020-07-09 19:50:24 +05:30
parent 63ebe1b2e2
commit 6e688975c7
No known key found for this signature in database
GPG Key ID: D2E4F00F29D02A4B

View File

@ -35,5 +35,12 @@ test("URL canonicalization", (t) => {
"http://alice.example.com/exchange/", "http://alice.example.com/exchange/",
helpers.canonicalizeBaseUrl("http://alice.example.com/exchange#foobar"), helpers.canonicalizeBaseUrl("http://alice.example.com/exchange#foobar"),
); );
// Remove search component
t.is(
"http://alice.example.com/exchange/",
helpers.canonicalizeBaseUrl("http://alice.example.com/exchange?foo=bar"),
);
t.pass(); t.pass();
}); });