@@ -205,6 +205,12 @@ describe('Optional Path Parameters', () => {
205205 name : 'optional param with prefix - omitted' ,
206206 path : '/posts/prefix{-$category}' ,
207207 params : { } ,
208+ result : '/posts' ,
209+ } ,
210+ {
211+ name : 'optional param with prefix - empty string' ,
212+ path : '/posts/prefix{-$category}' ,
213+ params : { category : '' } ,
208214 result : '/posts/prefix' ,
209215 } ,
210216 {
@@ -217,6 +223,12 @@ describe('Optional Path Parameters', () => {
217223 name : 'optional param with suffix - omitted' ,
218224 path : '/posts/{-$category}.html' ,
219225 params : { } ,
226+ result : '/posts' ,
227+ } ,
228+ {
229+ name : 'optional param with suffix - empty string' ,
230+ path : '/posts/{-$category}.html' ,
231+ params : { category : '' } ,
220232 result : '/posts/.html' ,
221233 } ,
222234 {
@@ -229,6 +241,12 @@ describe('Optional Path Parameters', () => {
229241 name : 'optional param with prefix and suffix - omitted' ,
230242 path : '/posts/prefix{-$category}suffix' ,
231243 params : { } ,
244+ result : '/posts' ,
245+ } ,
246+ {
247+ name : 'optional param with prefix and suffix - empty string' ,
248+ path : '/posts/prefix{-$category}suffix' ,
249+ params : { category : '' } ,
232250 result : '/posts/prefixsuffix' ,
233251 } ,
234252 {
0 commit comments