File tree Expand file tree Collapse file tree 1 file changed +8
-5
lines changed
test/unit/specs/directives/for Expand file tree Collapse file tree 1 file changed +8
-5
lines changed Original file line number Diff line number Diff line change @@ -595,15 +595,18 @@ if (_.inBrowser) {
595
595
expect ( hasWarned ( _ , 'Duplicate value' ) ) . toBe ( true )
596
596
} )
597
597
598
- it ( 'key val syntax with object' , function ( ) {
599
- new Vue ( {
598
+ it ( 'key val syntax with object' , function ( done ) {
599
+ var vm = new Vue ( {
600
600
el : el ,
601
- template : '<div v-for="(key,val) in items">{{key}} {{val}}</div>' ,
601
+ template : '<div v-for="(key,val) in items">{{$index}} {{ key}} {{val.a }}</div>' ,
602
602
data : {
603
- items : { 'a' : 'x' }
603
+ items : {
604
+ a : { a : 1 } ,
605
+ b : { a : 2 }
606
+ }
604
607
}
605
608
} )
606
- expect ( el . innerHTML ) . toBe ( '<div>a x</div>' )
609
+ assertObjectMutations ( vm , el , done )
607
610
} )
608
611
609
612
it ( 'key val syntax with array' , function ( ) {
You can’t perform that action at this time.
0 commit comments