@@ -69,7 +69,7 @@ describe('Router', () => {
69
69
) ;
70
70
71
71
expect ( scratch ) . to . have . property ( 'textContent' , 'Home' ) ;
72
- expect ( Home ) . to . have . been . calledWith ( { path : '/' , searchParams : { } , pathParams : { } , rest : '' , test : '2' } ) ;
72
+ expect ( Home ) . to . have . been . calledWith ( { path : '/' , searchParams : { } , pathParams : { } , test : '2' } ) ;
73
73
expect ( loc ) . to . deep . include ( {
74
74
url : '/' ,
75
75
path : '/' ,
@@ -98,7 +98,7 @@ describe('Router', () => {
98
98
render ( < App /> , scratch ) ;
99
99
100
100
expect ( scratch ) . to . have . property ( 'textContent' , 'Home' ) ;
101
- expect ( Home ) . to . have . been . calledWith ( { path : '/' , searchParams : { } , pathParams : { } , rest : '' , test : '2' } ) ;
101
+ expect ( Home ) . to . have . been . calledWith ( { path : '/' , searchParams : { } , pathParams : { } , test : '2' } ) ;
102
102
expect ( loc ) . to . deep . include ( {
103
103
url : '/' ,
104
104
path : '/' ,
@@ -108,7 +108,7 @@ describe('Router', () => {
108
108
set ( '3' )
109
109
await sleep ( 1 ) ;
110
110
111
- expect ( Home ) . to . have . been . calledWith ( { path : '/' , searchParams : { } , pathParams : { } , rest : '' , test : '3' } ) ;
111
+ expect ( Home ) . to . have . been . calledWith ( { path : '/' , searchParams : { } , pathParams : { } , test : '3' } ) ;
112
112
expect ( loc ) . to . deep . include ( {
113
113
url : '/' ,
114
114
path : '/' ,
@@ -138,7 +138,7 @@ describe('Router', () => {
138
138
) ;
139
139
140
140
expect ( scratch ) . to . have . property ( 'textContent' , 'Home' ) ;
141
- expect ( Home ) . to . have . been . calledWith ( { path : '/' , searchParams : { } , pathParams : { } , rest : '' } ) ;
141
+ expect ( Home ) . to . have . been . calledWith ( { path : '/' , searchParams : { } , pathParams : { } } ) ;
142
142
expect ( Profiles ) . not . to . have . been . called ;
143
143
expect ( Profile ) . not . to . have . been . called ;
144
144
expect ( Fallback ) . not . to . have . been . called ;
@@ -154,7 +154,7 @@ describe('Router', () => {
154
154
155
155
expect ( scratch ) . to . have . property ( 'textContent' , 'Profiles' ) ;
156
156
expect ( Home ) . not . to . have . been . called ;
157
- expect ( Profiles ) . to . have . been . calledWith ( { path : '/profiles' , searchParams : { } , pathParams : { } , rest : '' } ) ;
157
+ expect ( Profiles ) . to . have . been . calledWith ( { path : '/profiles' , searchParams : { } , pathParams : { } } ) ;
158
158
expect ( Profile ) . not . to . have . been . called ;
159
159
expect ( Fallback ) . not . to . have . been . called ;
160
160
@@ -172,7 +172,7 @@ describe('Router', () => {
172
172
expect ( Home ) . not . to . have . been . called ;
173
173
expect ( Profiles ) . not . to . have . been . called ;
174
174
expect ( Profile ) . to . have . been . calledWith (
175
- { path : '/profiles/bob' , searchParams : { } , pathParams : { id : 'bob' } , id : 'bob' , rest : '' } ,
175
+ { path : '/profiles/bob' , searchParams : { } , pathParams : { id : 'bob' } , id : 'bob' } ,
176
176
) ;
177
177
expect ( Fallback ) . not . to . have . been . called ;
178
178
@@ -191,7 +191,7 @@ describe('Router', () => {
191
191
expect ( Profiles ) . not . to . have . been . called ;
192
192
expect ( Profile ) . not . to . have . been . called ;
193
193
expect ( Fallback ) . to . have . been . calledWith (
194
- { default : true , path : '/other' , searchParams : { a : 'b' , c : 'd' } , pathParams : { } , rest : '' } ,
194
+ { default : true , path : '/other' , searchParams : { a : 'b' , c : 'd' } , pathParams : { } } ,
195
195
) ;
196
196
197
197
expect ( loc ) . to . deep . include ( {
@@ -228,13 +228,13 @@ describe('Router', () => {
228
228
) ;
229
229
230
230
expect ( scratch ) . to . have . property ( 'innerHTML' , '' ) ;
231
- expect ( A ) . to . have . been . calledWith ( { path : '/' , searchParams : { } , pathParams : { } , rest : '' } ) ;
231
+ expect ( A ) . to . have . been . calledWith ( { path : '/' , searchParams : { } , pathParams : { } } ) ;
232
232
233
233
A . resetHistory ( ) ;
234
234
await sleep ( 10 ) ;
235
235
236
236
expect ( scratch ) . to . have . property ( 'innerHTML' , '<h1>A</h1><p>hello</p>' ) ;
237
- expect ( A ) . to . have . been . calledWith ( { path : '/' , searchParams : { } , pathParams : { } , rest : '' } ) ;
237
+ expect ( A ) . to . have . been . calledWith ( { path : '/' , searchParams : { } , pathParams : { } } ) ;
238
238
239
239
A . resetHistory ( ) ;
240
240
loc . route ( '/b' ) ;
@@ -248,14 +248,14 @@ describe('Router', () => {
248
248
// We should never re-invoke <A /> while loading <B /> (that would be a remount of the old route):
249
249
// ...but we do
250
250
//expect(A).not.to.have.been.called;
251
- expect ( B ) . to . have . been . calledWith ( { path : '/b' , searchParams : { } , pathParams : { } , rest : '' } ) ;
251
+ expect ( B ) . to . have . been . calledWith ( { path : '/b' , searchParams : { } , pathParams : { } } ) ;
252
252
253
253
B . resetHistory ( ) ;
254
254
await sleep ( 10 ) ;
255
255
256
256
expect ( scratch ) . to . have . property ( 'innerHTML' , '<h1>B</h1><p>hello</p>' ) ;
257
257
expect ( B ) . to . have . been . calledOnce ;
258
- expect ( B ) . to . have . been . calledWith ( { path : '/b' , searchParams : { } , pathParams : { } , rest : '' } ) ;
258
+ expect ( B ) . to . have . been . calledWith ( { path : '/b' , searchParams : { } , pathParams : { } } ) ;
259
259
260
260
B . resetHistory ( ) ;
261
261
loc . route ( '/c' ) ;
@@ -275,14 +275,14 @@ describe('Router', () => {
275
275
// We should never re-invoke <B /> while loading <C /> (that would be a remount of the old route):
276
276
// ...but we do
277
277
//expect(B).not.to.have.been.called;
278
- expect ( C ) . to . have . been . calledWith ( { path : '/c' , searchParams : { } , pathParams : { } , rest : '' } ) ;
278
+ expect ( C ) . to . have . been . calledWith ( { path : '/c' , searchParams : { } , pathParams : { } } ) ;
279
279
280
280
C . resetHistory ( ) ;
281
281
await sleep ( 10 ) ;
282
282
283
283
expect ( scratch ) . to . have . property ( 'innerHTML' , '<h1>C</h1>' ) ;
284
284
expect ( C ) . to . have . been . calledOnce ;
285
- expect ( C ) . to . have . been . calledWith ( { path : '/c' , searchParams : { } , pathParams : { } , rest : '' } ) ;
285
+ expect ( C ) . to . have . been . calledWith ( { path : '/c' , searchParams : { } , pathParams : { } } ) ;
286
286
287
287
// "instant" routing to already-loaded routes
288
288
@@ -294,7 +294,7 @@ describe('Router', () => {
294
294
expect ( scratch ) . to . have . property ( 'innerHTML' , '<h1>B</h1><p>hello</p>' ) ;
295
295
expect ( C ) . not . to . have . been . called ;
296
296
expect ( B ) . to . have . been . calledOnce ;
297
- expect ( B ) . to . have . been . calledWith ( { path : '/b' , searchParams : { } , pathParams : { } , rest : '' } ) ;
297
+ expect ( B ) . to . have . been . calledWith ( { path : '/b' , searchParams : { } , pathParams : { } } ) ;
298
298
299
299
A . resetHistory ( ) ;
300
300
B . resetHistory ( ) ;
@@ -304,7 +304,7 @@ describe('Router', () => {
304
304
expect ( scratch ) . to . have . property ( 'innerHTML' , '<h1>A</h1><p>hello</p>' ) ;
305
305
expect ( B ) . not . to . have . been . called ;
306
306
expect ( A ) . to . have . been . calledOnce ;
307
- expect ( A ) . to . have . been . calledWith ( { path : '/' , searchParams : { } , pathParams : { } , rest : '' } ) ;
307
+ expect ( A ) . to . have . been . calledWith ( { path : '/' , searchParams : { } , pathParams : { } } ) ;
308
308
} ) ;
309
309
310
310
it ( 'rerenders same-component routes rather than swap' , async ( ) => {
@@ -395,7 +395,7 @@ describe('Router', () => {
395
395
) ;
396
396
397
397
expect ( scratch ) . to . have . property ( 'innerHTML' , '' ) ;
398
- expect ( A ) . to . have . been . calledWith ( { path : '/' , searchParams : { } , pathParams : { } , rest : '' } ) ;
398
+ expect ( A ) . to . have . been . calledWith ( { path : '/' , searchParams : { } , pathParams : { } } ) ;
399
399
expect ( loadStart ) . to . have . been . calledWith ( '/' ) ;
400
400
expect ( loadEnd ) . not . to . have . been . called ;
401
401
expect ( routeChange ) . not . to . have . been . called ;
@@ -407,7 +407,7 @@ describe('Router', () => {
407
407
await sleep ( 10 ) ;
408
408
409
409
expect ( scratch ) . to . have . property ( 'innerHTML' , '<h1>A</h1><p>hello</p>' ) ;
410
- expect ( A ) . to . have . been . calledWith ( { path : '/' , searchParams : { } , pathParams : { } , rest : '' } ) ;
410
+ expect ( A ) . to . have . been . calledWith ( { path : '/' , searchParams : { } , pathParams : { } } ) ;
411
411
expect ( loadStart ) . not . to . have . been . called ;
412
412
expect ( loadEnd ) . to . have . been . calledWith ( '/' ) ;
413
413
expect ( routeChange ) . not . to . have . been . called ;
@@ -947,7 +947,7 @@ describe('hydration', () => {
947
947
mutationObserver . observe ( scratch , { childList : true , subtree : true } ) ;
948
948
949
949
expect ( scratch ) . to . have . property ( 'innerHTML' , '<div><h1>A</h1><p>hello</p></div>' ) ;
950
- expect ( A ) . to . have . been . calledWith ( { path : '/' , searchParams : { } , pathParams : { } , rest : '' } ) ;
950
+ expect ( A ) . to . have . been . calledWith ( { path : '/' , searchParams : { } , pathParams : { } } ) ;
951
951
const oldOptionsVnode = options . __b ;
952
952
let hasMatched = false ;
953
953
options . __b = ( vnode ) => {
@@ -971,7 +971,7 @@ describe('hydration', () => {
971
971
await sleep ( 10 ) ;
972
972
973
973
expect ( scratch ) . to . have . property ( 'innerHTML' , '<div><h1>A</h1><p>hello</p></div>' ) ;
974
- expect ( A ) . to . have . been . calledWith ( { path : '/' , searchParams : { } , pathParams : { } , rest : '' } ) ;
974
+ expect ( A ) . to . have . been . calledWith ( { path : '/' , searchParams : { } , pathParams : { } } ) ;
975
975
expect ( mutations ) . to . have . length ( 0 ) ;
976
976
977
977
options . __b = oldOptionsVnode ;
0 commit comments