Skip to content

Commit 5df644e

Browse files
committed
Add test for ":name*" parameter matching
1 parent 77df638 commit 5df644e

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

src/index.spec.ts

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2592,6 +2592,24 @@ const TESTS: Test[] = [
25922592
[{ foo: "123" }, "/whatever/123"],
25932593
[{ foo: "#" }, null]
25942594
]
2595+
],
2596+
/**
2597+
* https://github.com/pillarjs/path-to-regexp/issues/260
2598+
*/
2599+
[
2600+
":name*",
2601+
undefined,
2602+
[
2603+
{
2604+
name: "name",
2605+
prefix: "",
2606+
suffix: "",
2607+
modifier: "*",
2608+
pattern: "[^\\/#\\?]+?"
2609+
}
2610+
],
2611+
[["foobar", ["foobar", "foobar"]]],
2612+
[[{ name: "foobar" }, "foobar"]]
25952613
]
25962614
];
25972615

0 commit comments

Comments
 (0)