Skip to content

Commit

Permalink
Add test for ":name*" parameter matching
Browse files Browse the repository at this point in the history
  • Loading branch information
kettanaito committed Aug 26, 2021
1 parent 77df638 commit 79b5591
Showing 1 changed file with 19 additions and 1 deletion.
20 changes: 19 additions & 1 deletion src/index.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2592,7 +2592,25 @@ const TESTS: Test[] = [
[{ foo: "123" }, "/whatever/123"],
[{ foo: "#" }, null]
]
]
],
/**
* https://github.com/pillarjs/path-to-regexp/issues/260
*/
[
":name*",
undefined,
[
{
name: "name",
prefix: "",
suffix: "",
modifier: "*",
pattern: "[^\\/#\\?]+?",
},
],
[["foobar", ["foobar", "foobar"]]],
[[{ name: "foobar" }, "foobar"]],
],
];

/**
Expand Down

0 comments on commit 79b5591

Please sign in to comment.