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 5df644e
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions src/index.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2592,6 +2592,24 @@ 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 5df644e

Please sign in to comment.