@@ -74,7 +74,7 @@ describe('Router', () => {
74
74
) ;
75
75
76
76
expect ( scratch ) . to . have . property ( 'textContent' , 'Home' ) ;
77
- expect ( Home ) . to . have . been . calledWith ( { path : '/' , searchParams : { } , pathParams : { } , rest : '' , test : '2' } ) ;
77
+ expect ( Home ) . to . have . been . calledWith ( { path : '/' , searchParams : { } , pathParams : { } , test : '2' } ) ;
78
78
expect ( loc ) . to . deep . include ( {
79
79
url : '/' ,
80
80
path : '/' ,
@@ -103,7 +103,7 @@ describe('Router', () => {
103
103
render ( < App /> , scratch ) ;
104
104
105
105
expect ( scratch ) . to . have . property ( 'textContent' , 'Home' ) ;
106
- expect ( Home ) . to . have . been . calledWith ( { path : '/' , searchParams : { } , pathParams : { } , rest : '' , test : '2' } ) ;
106
+ expect ( Home ) . to . have . been . calledWith ( { path : '/' , searchParams : { } , pathParams : { } , test : '2' } ) ;
107
107
expect ( loc ) . to . deep . include ( {
108
108
url : '/' ,
109
109
path : '/' ,
@@ -113,7 +113,7 @@ describe('Router', () => {
113
113
set ( '3' )
114
114
await sleep ( 1 ) ;
115
115
116
- expect ( Home ) . to . have . been . calledWith ( { path : '/' , searchParams : { } , pathParams : { } , rest : '' , test : '3' } ) ;
116
+ expect ( Home ) . to . have . been . calledWith ( { path : '/' , searchParams : { } , pathParams : { } , test : '3' } ) ;
117
117
expect ( loc ) . to . deep . include ( {
118
118
url : '/' ,
119
119
path : '/' ,
@@ -143,7 +143,7 @@ describe('Router', () => {
143
143
) ;
144
144
145
145
expect ( scratch ) . to . have . property ( 'textContent' , 'Home' ) ;
146
- expect ( Home ) . to . have . been . calledWith ( { path : '/' , searchParams : { } , pathParams : { } , rest : '' } ) ;
146
+ expect ( Home ) . to . have . been . calledWith ( { path : '/' , searchParams : { } , pathParams : { } } ) ;
147
147
expect ( Profiles ) . not . to . have . been . called ;
148
148
expect ( Profile ) . not . to . have . been . called ;
149
149
expect ( Fallback ) . not . to . have . been . called ;
@@ -159,7 +159,7 @@ describe('Router', () => {
159
159
160
160
expect ( scratch ) . to . have . property ( 'textContent' , 'Profiles' ) ;
161
161
expect ( Home ) . not . to . have . been . called ;
162
- expect ( Profiles ) . to . have . been . calledWith ( { path : '/profiles' , searchParams : { } , pathParams : { } , rest : '' } ) ;
162
+ expect ( Profiles ) . to . have . been . calledWith ( { path : '/profiles' , searchParams : { } , pathParams : { } } ) ;
163
163
expect ( Profile ) . not . to . have . been . called ;
164
164
expect ( Fallback ) . not . to . have . been . called ;
165
165
@@ -177,7 +177,7 @@ describe('Router', () => {
177
177
expect ( Home ) . not . to . have . been . called ;
178
178
expect ( Profiles ) . not . to . have . been . called ;
179
179
expect ( Profile ) . to . have . been . calledWith (
180
- { path : '/profiles/bob' , searchParams : { } , pathParams : { id : 'bob' } , id : 'bob' , rest : '' } ,
180
+ { path : '/profiles/bob' , searchParams : { } , pathParams : { id : 'bob' } , id : 'bob' } ,
181
181
) ;
182
182
expect ( Fallback ) . not . to . have . been . called ;
183
183
@@ -196,7 +196,7 @@ describe('Router', () => {
196
196
expect ( Profiles ) . not . to . have . been . called ;
197
197
expect ( Profile ) . not . to . have . been . called ;
198
198
expect ( Fallback ) . to . have . been . calledWith (
199
- { default : true , path : '/other' , searchParams : { a : 'b' , c : 'd' } , pathParams : { } , rest : '' } ,
199
+ { default : true , path : '/other' , searchParams : { a : 'b' , c : 'd' } , pathParams : { } } ,
200
200
) ;
201
201
202
202
expect ( loc ) . to . deep . include ( {
@@ -233,13 +233,13 @@ describe('Router', () => {
233
233
) ;
234
234
235
235
expect ( scratch ) . to . have . property ( 'innerHTML' , '' ) ;
236
- expect ( A ) . to . have . been . calledWith ( { path : '/' , searchParams : { } , pathParams : { } , rest : '' } ) ;
236
+ expect ( A ) . to . have . been . calledWith ( { path : '/' , searchParams : { } , pathParams : { } } ) ;
237
237
238
238
A . resetHistory ( ) ;
239
239
await sleep ( 10 ) ;
240
240
241
241
expect ( scratch ) . to . have . property ( 'innerHTML' , '<h1>A</h1><p>hello</p>' ) ;
242
- expect ( A ) . to . have . been . calledWith ( { path : '/' , searchParams : { } , pathParams : { } , rest : '' } ) ;
242
+ expect ( A ) . to . have . been . calledWith ( { path : '/' , searchParams : { } , pathParams : { } } ) ;
243
243
244
244
A . resetHistory ( ) ;
245
245
loc . route ( '/b' ) ;
@@ -253,14 +253,14 @@ describe('Router', () => {
253
253
// We should never re-invoke <A /> while loading <B /> (that would be a remount of the old route):
254
254
// ...but we do
255
255
//expect(A).not.to.have.been.called;
256
- expect ( B ) . to . have . been . calledWith ( { path : '/b' , searchParams : { } , pathParams : { } , rest : '' } ) ;
256
+ expect ( B ) . to . have . been . calledWith ( { path : '/b' , searchParams : { } , pathParams : { } } ) ;
257
257
258
258
B . resetHistory ( ) ;
259
259
await sleep ( 10 ) ;
260
260
261
261
expect ( scratch ) . to . have . property ( 'innerHTML' , '<h1>B</h1><p>hello</p>' ) ;
262
262
expect ( B ) . to . have . been . calledOnce ;
263
- expect ( B ) . to . have . been . calledWith ( { path : '/b' , searchParams : { } , pathParams : { } , rest : '' } ) ;
263
+ expect ( B ) . to . have . been . calledWith ( { path : '/b' , searchParams : { } , pathParams : { } } ) ;
264
264
265
265
B . resetHistory ( ) ;
266
266
loc . route ( '/c' ) ;
@@ -280,14 +280,14 @@ describe('Router', () => {
280
280
// We should never re-invoke <B /> while loading <C /> (that would be a remount of the old route):
281
281
// ...but we do
282
282
//expect(B).not.to.have.been.called;
283
- expect ( C ) . to . have . been . calledWith ( { path : '/c' , searchParams : { } , pathParams : { } , rest : '' } ) ;
283
+ expect ( C ) . to . have . been . calledWith ( { path : '/c' , searchParams : { } , pathParams : { } } ) ;
284
284
285
285
C . resetHistory ( ) ;
286
286
await sleep ( 10 ) ;
287
287
288
288
expect ( scratch ) . to . have . property ( 'innerHTML' , '<h1>C</h1>' ) ;
289
289
expect ( C ) . to . have . been . calledOnce ;
290
- expect ( C ) . to . have . been . calledWith ( { path : '/c' , searchParams : { } , pathParams : { } , rest : '' } ) ;
290
+ expect ( C ) . to . have . been . calledWith ( { path : '/c' , searchParams : { } , pathParams : { } } ) ;
291
291
292
292
// "instant" routing to already-loaded routes
293
293
@@ -299,7 +299,7 @@ describe('Router', () => {
299
299
expect ( scratch ) . to . have . property ( 'innerHTML' , '<h1>B</h1><p>hello</p>' ) ;
300
300
expect ( C ) . not . to . have . been . called ;
301
301
expect ( B ) . to . have . been . calledOnce ;
302
- expect ( B ) . to . have . been . calledWith ( { path : '/b' , searchParams : { } , pathParams : { } , rest : '' } ) ;
302
+ expect ( B ) . to . have . been . calledWith ( { path : '/b' , searchParams : { } , pathParams : { } } ) ;
303
303
304
304
A . resetHistory ( ) ;
305
305
B . resetHistory ( ) ;
@@ -309,7 +309,7 @@ describe('Router', () => {
309
309
expect ( scratch ) . to . have . property ( 'innerHTML' , '<h1>A</h1><p>hello</p>' ) ;
310
310
expect ( B ) . not . to . have . been . called ;
311
311
expect ( A ) . to . have . been . calledOnce ;
312
- expect ( A ) . to . have . been . calledWith ( { path : '/' , searchParams : { } , pathParams : { } , rest : '' } ) ;
312
+ expect ( A ) . to . have . been . calledWith ( { path : '/' , searchParams : { } , pathParams : { } } ) ;
313
313
} ) ;
314
314
315
315
it ( 'rerenders same-component routes rather than swap' , async ( ) => {
@@ -398,7 +398,7 @@ describe('Router', () => {
398
398
) ;
399
399
400
400
expect ( scratch ) . to . have . property ( 'innerHTML' , '' ) ;
401
- expect ( A ) . to . have . been . calledWith ( { path : '/' , searchParams : { } , pathParams : { } , rest : '' } ) ;
401
+ expect ( A ) . to . have . been . calledWith ( { path : '/' , searchParams : { } , pathParams : { } } ) ;
402
402
expect ( loadStart ) . to . have . been . calledWith ( '/' ) ;
403
403
expect ( loadEnd ) . not . to . have . been . called ;
404
404
expect ( routeChange ) . not . to . have . been . called ;
@@ -410,7 +410,7 @@ describe('Router', () => {
410
410
await sleep ( 1 ) ;
411
411
412
412
expect ( scratch ) . to . have . property ( 'innerHTML' , '<h1>A</h1><p>hello</p>' ) ;
413
- expect ( A ) . to . have . been . calledWith ( { path : '/' , searchParams : { } , pathParams : { } , rest : '' } ) ;
413
+ expect ( A ) . to . have . been . calledWith ( { path : '/' , searchParams : { } , pathParams : { } } ) ;
414
414
expect ( loadStart ) . not . to . have . been . called ;
415
415
expect ( loadEnd ) . to . have . been . calledWith ( '/' ) ;
416
416
expect ( routeChange ) . not . to . have . been . called ;
@@ -931,7 +931,7 @@ describe('hydration', () => {
931
931
mutationObserver . observe ( scratch , { childList : true , subtree : true } ) ;
932
932
933
933
expect ( scratch ) . to . have . property ( 'innerHTML' , '<div><h1>A</h1><p>hello</p></div>' ) ;
934
- expect ( A ) . to . have . been . calledWith ( { path : '/' , searchParams : { } , pathParams : { } , rest : '' } ) ;
934
+ expect ( A ) . to . have . been . calledWith ( { path : '/' , searchParams : { } , pathParams : { } } ) ;
935
935
const oldOptionsVnode = options . __b ;
936
936
let hasMatched = false ;
937
937
options . __b = ( vnode ) => {
@@ -955,7 +955,7 @@ describe('hydration', () => {
955
955
await sleep ( 10 ) ;
956
956
957
957
expect ( scratch ) . to . have . property ( 'innerHTML' , '<div><h1>A</h1><p>hello</p></div>' ) ;
958
- expect ( A ) . to . have . been . calledWith ( { path : '/' , searchParams : { } , pathParams : { } , rest : '' } ) ;
958
+ expect ( A ) . to . have . been . calledWith ( { path : '/' , searchParams : { } , pathParams : { } } ) ;
959
959
expect ( mutations ) . to . have . length ( 0 ) ;
960
960
961
961
options . __b = oldOptionsVnode ;
0 commit comments