summaryrefslogtreecommitdiff
path: root/tests/unit/urlpattern_test.ts
diff options
context:
space:
mode:
Diffstat (limited to 'tests/unit/urlpattern_test.ts')
-rw-r--r--tests/unit/urlpattern_test.ts6
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/unit/urlpattern_test.ts b/tests/unit/urlpattern_test.ts
index 3c1fb0cf1..65c224173 100644
--- a/tests/unit/urlpattern_test.ts
+++ b/tests/unit/urlpattern_test.ts
@@ -63,3 +63,9 @@ Deno.test(function urlPatternWithPrototypePollution() {
RegExp.prototype.exec = originalExec;
}
});
+
+Deno.test(function urlPatternEmptyFallback() {
+ const p = new URLPattern({ pathname: "/foo/bar{/:qaz}?" });
+ const match = p.exec("https://example.com/foo/bar");
+ assertEquals(match!.pathname.groups.qaz, "");
+});