@@ -68,17 +68,17 @@ describe('URL Encoding', () => {
6868 const router = createRouter ( )
6969 await router . push ( '/p/foo' )
7070 // one extra time for hash
71- expect ( encoding . decode ) . toHaveBeenCalledTimes ( 2 )
72- expect ( encoding . decode ) . toHaveBeenNthCalledWith ( 1 , 'foo' )
71+ expect ( encoding . decode ) . toHaveBeenCalledTimes ( 3 )
72+ expect ( encoding . decode ) . toHaveBeenNthCalledWith ( 2 , 'foo' )
7373 } )
7474
7575 it ( 'calls decode with a path with repeatable params' , async ( ) => {
7676 const router = createRouter ( )
7777 await router . push ( '/p/foo/bar' )
7878 // one extra time for hash
79- expect ( encoding . decode ) . toHaveBeenCalledTimes ( 3 )
80- expect ( encoding . decode ) . toHaveBeenNthCalledWith ( 1 , 'foo' , 0 , [ 'foo' , 'bar' ] )
81- expect ( encoding . decode ) . toHaveBeenNthCalledWith ( 2 , 'bar' , 1 , [ 'foo' , 'bar' ] )
79+ expect ( encoding . decode ) . toHaveBeenCalledTimes ( 4 )
80+ expect ( encoding . decode ) . toHaveBeenNthCalledWith ( 2 , 'foo' , 0 , [ 'foo' , 'bar' ] )
81+ expect ( encoding . decode ) . toHaveBeenNthCalledWith ( 3 , 'bar' , 1 , [ 'foo' , 'bar' ] )
8282 } )
8383
8484 it ( 'decodes values in params' , async ( ) => {
@@ -108,7 +108,7 @@ describe('URL Encoding', () => {
108108 const router = createRouter ( )
109109 await router . push ( '/?p=foo' )
110110 // one extra time for hash
111- expect ( encoding . decode ) . toHaveBeenCalledTimes ( 3 )
111+ expect ( encoding . decode ) . toHaveBeenCalledTimes ( 4 )
112112 expect ( encoding . decode ) . toHaveBeenNthCalledWith ( 1 , 'p' )
113113 expect ( encoding . decode ) . toHaveBeenNthCalledWith ( 2 , 'foo' )
114114 } )
0 commit comments