File tree Expand file tree Collapse file tree 1 file changed +13
-5
lines changed Expand file tree Collapse file tree 1 file changed +13
-5
lines changed Original file line number Diff line number Diff line change @@ -199,7 +199,10 @@ describe('Core', function () {
199
199
} ,
200
200
// test v-link with relative path + append
201
201
'/c' : {
202
- component : { template : '<a id="link-c" v-link="{ path: \'d\', append: true }">Link C</a><router-view></router-view>' } ,
202
+ component : { template :
203
+ '<a id="link-c" v-link="{ path: \'d\', append: true }">Link C</a><router-view></router-view>' +
204
+ '<a id="link-null" v-link="{ path: null }"></a>'
205
+ } ,
203
206
subRoutes : {
204
207
'/d' : {
205
208
component : { template : '+D' }
@@ -231,11 +234,16 @@ describe('Core', function () {
231
234
router . go ( '/c' )
232
235
nextTick ( function ( ) {
233
236
expect ( el . textContent ) . toBe ( 'Link C' )
234
- var link = el . querySelector ( '#link-c ' )
235
- click ( link )
237
+ var nullLink = el . querySelector ( '#link-null ' )
238
+ click ( nullLink )
236
239
nextTick ( function ( ) {
237
- expect ( el . textContent ) . toBe ( 'Link C+D' )
238
- done ( )
240
+ expect ( el . textContent ) . toBe ( 'Link C' )
241
+ var link = el . querySelector ( '#link-c' )
242
+ click ( link )
243
+ nextTick ( function ( ) {
244
+ expect ( el . textContent ) . toBe ( 'Link C+D' )
245
+ done ( )
246
+ } )
239
247
} )
240
248
} )
241
249
} )
You can’t perform that action at this time.
0 commit comments