File tree Expand file tree Collapse file tree 1 file changed +19
-2
lines changed Expand file tree Collapse file tree 1 file changed +19
-2
lines changed Original file line number Diff line number Diff line change 66 type CompileOptions ,
77 type ParamData ,
88 TokenData ,
9+ Path ,
910} from "./index.js" ;
1011
1112export interface ParserTestSet {
@@ -21,7 +22,7 @@ export interface StringifyTestSet {
2122}
2223
2324export interface CompileTestSet {
24- path : string ;
25+ path : Path ;
2526 options ?: CompileOptions & ParseOptions ;
2627 tests : Array < {
2728 input : ParamData | undefined ;
@@ -30,7 +31,7 @@ export interface CompileTestSet {
3031}
3132
3233export interface MatchTestSet {
33- path : string ;
34+ path : Path | Path [ ] ;
3435 options ?: MatchOptions & ParseOptions ;
3536 tests : Array < {
3637 input : string ;
@@ -1644,4 +1645,20 @@ export const MATCH_TESTS: MatchTestSet[] = [
16441645 } ,
16451646 ] ,
16461647 } ,
1648+
1649+ /**
1650+ * Array input is normalized.
1651+ */
1652+ {
1653+ path : [ "/:foo/:bar" , "/:foo/:baz" ] ,
1654+ tests : [
1655+ {
1656+ input : "/hello/world" ,
1657+ expected : {
1658+ path : "/hello/world" ,
1659+ params : { foo : "hello" , bar : "world" } ,
1660+ } ,
1661+ } ,
1662+ ] ,
1663+ } ,
16471664] ;
You can’t perform that action at this time.
0 commit comments