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 () {
199199 } ,
200200 // test v-link with relative path + append
201201 '/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+ } ,
203206 subRoutes : {
204207 '/d' : {
205208 component : { template : '+D' }
@@ -231,11 +234,16 @@ describe('Core', function () {
231234 router . go ( '/c' )
232235 nextTick ( function ( ) {
233236 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 )
236239 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+ } )
239247 } )
240248 } )
241249 } )
You can’t perform that action at this time.
0 commit comments