aboutsummaryrefslogtreecommitdiff
path: root/src/util
diff options
context:
space:
mode:
authorFlorian Dold <florian.dold@gmail.com>2020-07-09 19:50:24 +0530
committerFlorian Dold <florian.dold@gmail.com>2020-07-09 19:50:24 +0530
commit6e688975c75c52fe69286531615952d56114fcc7 (patch)
tree5d1748808ca56b8166d83d0b3f9f4bc1b4f40fa4 /src/util
parent63ebe1b2e296aabb79cb1756d5dfc82c1ba4fe02 (diff)
add base URL canonicalization test
Diffstat (limited to 'src/util')
-rw-r--r--src/util/helpers-test.ts7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/util/helpers-test.ts b/src/util/helpers-test.ts
index 35f3d87b2..dbecf14b8 100644
--- a/src/util/helpers-test.ts
+++ b/src/util/helpers-test.ts
@@ -35,5 +35,12 @@ test("URL canonicalization", (t) => {
"http://alice.example.com/exchange/",
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();
});