@@ -68,17 +68,17 @@ describe('URL Encoding', () => {
68
68
const router = createRouter ( )
69
69
await router . push ( '/p/foo' )
70
70
// 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' )
73
73
} )
74
74
75
75
it ( 'calls decode with a path with repeatable params' , async ( ) => {
76
76
const router = createRouter ( )
77
77
await router . push ( '/p/foo/bar' )
78
78
// 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' ] )
82
82
} )
83
83
84
84
it ( 'decodes values in params' , async ( ) => {
@@ -108,7 +108,7 @@ describe('URL Encoding', () => {
108
108
const router = createRouter ( )
109
109
await router . push ( '/?p=foo' )
110
110
// one extra time for hash
111
- expect ( encoding . decode ) . toHaveBeenCalledTimes ( 3 )
111
+ expect ( encoding . decode ) . toHaveBeenCalledTimes ( 4 )
112
112
expect ( encoding . decode ) . toHaveBeenNthCalledWith ( 1 , 'p' )
113
113
expect ( encoding . decode ) . toHaveBeenNthCalledWith ( 2 , 'foo' )
114
114
} )
0 commit comments