@@ -401,6 +401,7 @@ test.describe("typegen", () => {
401401 route("no-params", "routes/no-params.tsx"),
402402 route("required-param/:req", "routes/required-param.tsx"),
403403 route("optional-param/:opt?", "routes/optional-param.tsx"),
404+ route("/leading-and-trailing-slash/", "routes/leading-and-trailing-slash.tsx"),
404405 route("some-other-route", "routes/some-other-route.tsx"),
405406 ] satisfies RouteConfig;
406407 ` ,
@@ -413,6 +414,9 @@ test.describe("typegen", () => {
413414 "app/routes/optional-param.tsx" : tsx `
414415 export default function Component() {}
415416 ` ,
417+ "app/routes/leading-and-trailing-slash.tsx" : tsx `
418+ export default function Component() {}
419+ ` ,
416420 "app/routes/some-other-route.tsx" : tsx `
417421 import { href } from "react-router"
418422
@@ -428,6 +432,10 @@ test.describe("typegen", () => {
428432 href("/optional-param/:opt?")
429433 href("/optional-param/:opt?", { opt: "hello" })
430434
435+ href("/leading-and-trailing-slash")
436+ // @ts-expect-error
437+ href("/leading-and-trailing-slash/")
438+
431439 export default function Component() {}
432440 ` ,
433441 } ) ;
0 commit comments