Add test case for optional segment.

This commit is contained in:
Dillon Kearns 2022-09-12 13:21:41 -07:00
parent 261cd64ed5
commit a9ac1ca707

View File

@ -119,6 +119,18 @@ suite =
]
]
)
, test "optional param" <|
\() ->
[ "Docs", "Section__" ]
|> expectRouteDefinition
(Elm.variantWith "Docs__Section__"
[ Elm.Annotation.record
[ ( "section"
, Elm.Annotation.maybe Elm.Annotation.string
)
]
]
)
]
]