File tree Expand file tree Collapse file tree 1 file changed +21
-0
lines changed
packages/route-pattern/src/lib Expand file tree Collapse file tree 1 file changed +21
-0
lines changed Original file line number Diff line number Diff line change @@ -420,6 +420,27 @@ describe('RoutePattern', () => {
420420 } )
421421 } )
422422
423+ it ( 'handles arabic in URLs' , ( ) => {
424+ let pattern = new RoutePattern ( 'users/:username' )
425+ assert . deepEqual ( pattern . match ( 'https://example.com/users/مهدي' ) , {
426+ params : { username : 'مهدي' } ,
427+ } )
428+ } )
429+
430+ it ( 'handles accents in URLs' , ( ) => {
431+ let pattern = new RoutePattern ( 'users/:username' )
432+ assert . deepEqual ( pattern . match ( 'https://example.com/users/sélim' ) , {
433+ params : { username : 'sélim' } ,
434+ } )
435+ } )
436+
437+ it ( 'handles emojis in URLs' , ( ) => {
438+ let pattern = new RoutePattern ( 'frameworks/:framework' )
439+ assert . deepEqual ( pattern . match ( 'https://example.com/frameworks/💿' ) , {
440+ params : { framework : '💿' } ,
441+ } )
442+ } )
443+
423444 it ( 'handles wildcards that look like paths' , ( ) => {
424445 let pattern = new RoutePattern ( 'proxy/*url' )
425446 assert . deepEqual ( pattern . match ( 'https://example.com/proxy/https://other.com/api' ) ?. params , {
You can’t perform that action at this time.
0 commit comments