@@ -115,7 +115,7 @@ describe('Router', () => {
115
115
) ;
116
116
117
117
expect ( scratch ) . to . have . property ( 'textContent' , 'Home' ) ;
118
- expect ( Home ) . to . have . been . calledWith ( { path : '/' , searchParams : { } , pathParams : { } , rest : '' , test : '2' } ) ;
118
+ expect ( Home ) . to . have . been . calledWith ( { path : '/' , searchParams : { } , pathParams : { } , test : '2' } ) ;
119
119
expect ( loc ) . to . deep . include ( {
120
120
url : '/' ,
121
121
path : '/' ,
@@ -144,7 +144,7 @@ describe('Router', () => {
144
144
render ( < App /> , scratch ) ;
145
145
146
146
expect ( scratch ) . to . have . property ( 'textContent' , 'Home' ) ;
147
- expect ( Home ) . to . have . been . calledWith ( { path : '/' , searchParams : { } , pathParams : { } , rest : '' , test : '2' } ) ;
147
+ expect ( Home ) . to . have . been . calledWith ( { path : '/' , searchParams : { } , pathParams : { } , test : '2' } ) ;
148
148
expect ( loc ) . to . deep . include ( {
149
149
url : '/' ,
150
150
path : '/' ,
@@ -154,7 +154,7 @@ describe('Router', () => {
154
154
set ( '3' )
155
155
await sleep ( 1 ) ;
156
156
157
- expect ( Home ) . to . have . been . calledWith ( { path : '/' , searchParams : { } , pathParams : { } , rest : '' , test : '3' } ) ;
157
+ expect ( Home ) . to . have . been . calledWith ( { path : '/' , searchParams : { } , pathParams : { } , test : '3' } ) ;
158
158
expect ( loc ) . to . deep . include ( {
159
159
url : '/' ,
160
160
path : '/' ,
@@ -184,7 +184,7 @@ describe('Router', () => {
184
184
) ;
185
185
186
186
expect ( scratch ) . to . have . property ( 'textContent' , 'Home' ) ;
187
- expect ( Home ) . to . have . been . calledWith ( { path : '/' , searchParams : { } , pathParams : { } , rest : '' } ) ;
187
+ expect ( Home ) . to . have . been . calledWith ( { path : '/' , searchParams : { } , pathParams : { } } ) ;
188
188
expect ( Profiles ) . not . to . have . been . called ;
189
189
expect ( Profile ) . not . to . have . been . called ;
190
190
expect ( Fallback ) . not . to . have . been . called ;
@@ -200,7 +200,7 @@ describe('Router', () => {
200
200
201
201
expect ( scratch ) . to . have . property ( 'textContent' , 'Profiles' ) ;
202
202
expect ( Home ) . not . to . have . been . called ;
203
- expect ( Profiles ) . to . have . been . calledWith ( { path : '/profiles' , searchParams : { } , pathParams : { } , rest : '' } ) ;
203
+ expect ( Profiles ) . to . have . been . calledWith ( { path : '/profiles' , searchParams : { } , pathParams : { } } ) ;
204
204
expect ( Profile ) . not . to . have . been . called ;
205
205
expect ( Fallback ) . not . to . have . been . called ;
206
206
@@ -218,7 +218,7 @@ describe('Router', () => {
218
218
expect ( Home ) . not . to . have . been . called ;
219
219
expect ( Profiles ) . not . to . have . been . called ;
220
220
expect ( Profile ) . to . have . been . calledWith (
221
- { path : '/profiles/bob' , searchParams : { } , pathParams : { id : 'bob' } , id : 'bob' , rest : '' } ,
221
+ { path : '/profiles/bob' , searchParams : { } , pathParams : { id : 'bob' } , id : 'bob' } ,
222
222
) ;
223
223
expect ( Fallback ) . not . to . have . been . called ;
224
224
@@ -237,7 +237,7 @@ describe('Router', () => {
237
237
expect ( Profiles ) . not . to . have . been . called ;
238
238
expect ( Profile ) . not . to . have . been . called ;
239
239
expect ( Fallback ) . to . have . been . calledWith (
240
- { default : true , path : '/other' , searchParams : { a : 'b' , c : 'd' } , pathParams : { } , rest : '' } ,
240
+ { default : true , path : '/other' , searchParams : { a : 'b' , c : 'd' } , pathParams : { } } ,
241
241
) ;
242
242
243
243
expect ( loc ) . to . deep . include ( {
@@ -274,13 +274,13 @@ describe('Router', () => {
274
274
) ;
275
275
276
276
expect ( scratch ) . to . have . property ( 'innerHTML' , '' ) ;
277
- expect ( A ) . to . have . been . calledWith ( { path : '/' , searchParams : { } , pathParams : { } , rest : '' } ) ;
277
+ expect ( A ) . to . have . been . calledWith ( { path : '/' , searchParams : { } , pathParams : { } } ) ;
278
278
279
279
A . resetHistory ( ) ;
280
280
await sleep ( 10 ) ;
281
281
282
282
expect ( scratch ) . to . have . property ( 'innerHTML' , '<h1>A</h1><p>hello</p>' ) ;
283
- expect ( A ) . to . have . been . calledWith ( { path : '/' , searchParams : { } , pathParams : { } , rest : '' } ) ;
283
+ expect ( A ) . to . have . been . calledWith ( { path : '/' , searchParams : { } , pathParams : { } } ) ;
284
284
285
285
A . resetHistory ( ) ;
286
286
loc . route ( '/b' ) ;
@@ -293,14 +293,14 @@ describe('Router', () => {
293
293
expect ( scratch ) . to . have . property ( 'innerHTML' , '<h1>A</h1><p>hello</p>' ) ;
294
294
// We should never re-invoke <A /> while loading <B /> (that would be a remount of the old route):
295
295
expect ( A ) . not . to . have . been . called ;
296
- expect ( B ) . to . have . been . calledWith ( { path : '/b' , searchParams : { } , pathParams : { } , rest : '' } ) ;
296
+ expect ( B ) . to . have . been . calledWith ( { path : '/b' , searchParams : { } , pathParams : { } } ) ;
297
297
298
298
B . resetHistory ( ) ;
299
299
await sleep ( 10 ) ;
300
300
301
301
expect ( scratch ) . to . have . property ( 'innerHTML' , '<h1>B</h1><p>hello</p>' ) ;
302
302
expect ( B ) . to . have . been . calledOnce ;
303
- expect ( B ) . to . have . been . calledWith ( { path : '/b' , searchParams : { } , pathParams : { } , rest : '' } ) ;
303
+ expect ( B ) . to . have . been . calledWith ( { path : '/b' , searchParams : { } , pathParams : { } } ) ;
304
304
305
305
B . resetHistory ( ) ;
306
306
loc . route ( '/c' ) ;
@@ -319,14 +319,14 @@ describe('Router', () => {
319
319
expect ( scratch ) . to . have . property ( 'innerHTML' , '<h1>B</h1><p>hello</p>' ) ;
320
320
// We should never re-invoke <B /> while loading <C /> (that would be a remount of the old route):
321
321
expect ( B ) . not . to . have . been . called ;
322
- expect ( C ) . to . have . been . calledWith ( { path : '/c' , searchParams : { } , pathParams : { } , rest : '' } ) ;
322
+ expect ( C ) . to . have . been . calledWith ( { path : '/c' , searchParams : { } , pathParams : { } } ) ;
323
323
324
324
C . resetHistory ( ) ;
325
325
await sleep ( 10 ) ;
326
326
327
327
expect ( scratch ) . to . have . property ( 'innerHTML' , '<h1>C</h1>' ) ;
328
328
expect ( C ) . to . have . been . calledOnce ;
329
- expect ( C ) . to . have . been . calledWith ( { path : '/c' , searchParams : { } , pathParams : { } , rest : '' } ) ;
329
+ expect ( C ) . to . have . been . calledWith ( { path : '/c' , searchParams : { } , pathParams : { } } ) ;
330
330
331
331
// "instant" routing to already-loaded routes
332
332
@@ -338,7 +338,7 @@ describe('Router', () => {
338
338
expect ( scratch ) . to . have . property ( 'innerHTML' , '<h1>B</h1><p>hello</p>' ) ;
339
339
expect ( C ) . not . to . have . been . called ;
340
340
expect ( B ) . to . have . been . calledOnce ;
341
- expect ( B ) . to . have . been . calledWith ( { path : '/b' , searchParams : { } , pathParams : { } , rest : '' } ) ;
341
+ expect ( B ) . to . have . been . calledWith ( { path : '/b' , searchParams : { } , pathParams : { } } ) ;
342
342
343
343
A . resetHistory ( ) ;
344
344
B . resetHistory ( ) ;
@@ -348,7 +348,7 @@ describe('Router', () => {
348
348
expect ( scratch ) . to . have . property ( 'innerHTML' , '<h1>A</h1><p>hello</p>' ) ;
349
349
expect ( B ) . not . to . have . been . called ;
350
350
expect ( A ) . to . have . been . calledOnce ;
351
- expect ( A ) . to . have . been . calledWith ( { path : '/' , searchParams : { } , pathParams : { } , rest : '' } ) ;
351
+ expect ( A ) . to . have . been . calledWith ( { path : '/' , searchParams : { } , pathParams : { } } ) ;
352
352
} ) ;
353
353
354
354
it ( 'rerenders same-component routes rather than swap' , async ( ) => {
@@ -437,7 +437,7 @@ describe('Router', () => {
437
437
) ;
438
438
439
439
expect ( scratch ) . to . have . property ( 'innerHTML' , '' ) ;
440
- expect ( A ) . to . have . been . calledWith ( { path : '/' , searchParams : { } , pathParams : { } , rest : '' } ) ;
440
+ expect ( A ) . to . have . been . calledWith ( { path : '/' , searchParams : { } , pathParams : { } } ) ;
441
441
expect ( loadStart ) . to . have . been . calledWith ( '/' ) ;
442
442
expect ( loadEnd ) . not . to . have . been . called ;
443
443
expect ( routeChange ) . not . to . have . been . called ;
@@ -449,7 +449,7 @@ describe('Router', () => {
449
449
await sleep ( 1 ) ;
450
450
451
451
expect ( scratch ) . to . have . property ( 'innerHTML' , '<h1>A</h1><p>hello</p>' ) ;
452
- expect ( A ) . to . have . been . calledWith ( { path : '/' , searchParams : { } , pathParams : { } , rest : '' } ) ;
452
+ expect ( A ) . to . have . been . calledWith ( { path : '/' , searchParams : { } , pathParams : { } } ) ;
453
453
expect ( loadStart ) . not . to . have . been . called ;
454
454
expect ( loadEnd ) . to . have . been . calledWith ( '/' ) ;
455
455
expect ( routeChange ) . not . to . have . been . called ;
@@ -1044,7 +1044,7 @@ describe('hydration', () => {
1044
1044
mutationObserver . observe ( scratch , { childList : true , subtree : true } ) ;
1045
1045
1046
1046
expect ( scratch ) . to . have . property ( 'innerHTML' , '<div><h1>A</h1><p>hello</p></div>' ) ;
1047
- expect ( A ) . to . have . been . calledWith ( { path : '/' , searchParams : { } , pathParams : { } , rest : '' } ) ;
1047
+ expect ( A ) . to . have . been . calledWith ( { path : '/' , searchParams : { } , pathParams : { } } ) ;
1048
1048
const oldOptionsVnode = options . __b ;
1049
1049
let hasMatched = false ;
1050
1050
options . __b = ( vnode ) => {
@@ -1068,7 +1068,7 @@ describe('hydration', () => {
1068
1068
await sleep ( 10 ) ;
1069
1069
1070
1070
expect ( scratch ) . to . have . property ( 'innerHTML' , '<div><h1>A</h1><p>hello</p></div>' ) ;
1071
- expect ( A ) . to . have . been . calledWith ( { path : '/' , searchParams : { } , pathParams : { } , rest : '' } ) ;
1071
+ expect ( A ) . to . have . been . calledWith ( { path : '/' , searchParams : { } , pathParams : { } } ) ;
1072
1072
expect ( mutations ) . to . have . length ( 0 ) ;
1073
1073
1074
1074
options . __b = oldOptionsVnode ;
0 commit comments