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 6
6
type CompileOptions ,
7
7
type ParamData ,
8
8
TokenData ,
9
+ Path ,
9
10
} from "./index.js" ;
10
11
11
12
export interface ParserTestSet {
@@ -21,7 +22,7 @@ export interface StringifyTestSet {
21
22
}
22
23
23
24
export interface CompileTestSet {
24
- path : string ;
25
+ path : Path ;
25
26
options ?: CompileOptions & ParseOptions ;
26
27
tests : Array < {
27
28
input : ParamData | undefined ;
@@ -30,7 +31,7 @@ export interface CompileTestSet {
30
31
}
31
32
32
33
export interface MatchTestSet {
33
- path : string ;
34
+ path : Path | Path [ ] ;
34
35
options ?: MatchOptions & ParseOptions ;
35
36
tests : Array < {
36
37
input : string ;
@@ -1644,4 +1645,20 @@ export const MATCH_TESTS: MatchTestSet[] = [
1644
1645
} ,
1645
1646
] ,
1646
1647
} ,
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
+ } ,
1647
1664
] ;
You can’t perform that action at this time.
0 commit comments