Skip to content

Commit 2f78e24

Browse files
committed
More token data object tests
1 parent 3350e30 commit 2f78e24

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

src/cases.spec.ts

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -333,6 +333,15 @@ export const COMPILE_TESTS: CompileTestSet[] = [
333333
{ input: { test: "123/xyz" }, expected: "/123/xyz" },
334334
],
335335
},
336+
{
337+
path: {
338+
tokens: [
339+
{ type: "text", value: "/" },
340+
{ type: "param", name: "test" },
341+
],
342+
},
343+
tests: [{ input: { test: "123" }, expected: "/123" }],
344+
},
336345
];
337346

338347
/**
@@ -1688,4 +1697,19 @@ export const MATCH_TESTS: MatchTestSet[] = [
16881697
},
16891698
],
16901699
},
1700+
1701+
/**
1702+
* Token data.
1703+
*/
1704+
{
1705+
path: {
1706+
tokens: [
1707+
{ type: "text", value: "/" },
1708+
{ type: "param", name: "test" },
1709+
],
1710+
},
1711+
tests: [
1712+
{ input: "/123", expected: { path: "/123", params: { test: "123" } } },
1713+
],
1714+
},
16911715
];

0 commit comments

Comments
 (0)