File tree Expand file tree Collapse file tree 2 files changed +12
-10
lines changed
Expand file tree Collapse file tree 2 files changed +12
-10
lines changed Original file line number Diff line number Diff line change @@ -26,7 +26,6 @@ module.exports = {
2626 child [ childKey ] = val
2727 }
2828 } , {
29- sync : true ,
3029 filters : prop . filters ,
3130 // important: props need to be observed on the
3231 // repeat scope if present
@@ -53,7 +52,7 @@ module.exports = {
5352 childKey ,
5453 function ( val ) {
5554 parent . $set ( parentKey , val )
56- } , { sync : true }
55+ }
5756 )
5857 } )
5958 }
Original file line number Diff line number Diff line change @@ -101,7 +101,7 @@ describe('Instance state initialization', function () {
101101 expect ( vm . hasOwnProperty ( 'a' ) ) . toBe ( false )
102102 } )
103103
104- it ( 'replace $data and handle props' , function ( ) {
104+ it ( 'replace $data and handle props' , function ( done ) {
105105 var el = document . createElement ( 'div' )
106106 var vm = new Vue ( {
107107 el : el ,
@@ -143,13 +143,16 @@ describe('Instance state initialization', function () {
143143 expect ( child . a ) . toBe ( 2 )
144144 expect ( child . b ) . toBe ( 3 )
145145 expect ( child . c ) . toBe ( 4 )
146- // assert parent state
147- // one-way
148- expect ( vm . a ) . toBe ( 1 )
149- // one-time
150- expect ( vm . b ) . toBe ( 2 )
151- // two-way
152- expect ( vm . c ) . toBe ( 4 )
146+ Vue . nextTick ( function ( ) {
147+ // assert parent state
148+ // one-way
149+ expect ( vm . a ) . toBe ( 1 )
150+ // one-time
151+ expect ( vm . b ) . toBe ( 2 )
152+ // two-way
153+ expect ( vm . c ) . toBe ( 4 )
154+ done ( )
155+ } )
153156 } )
154157 } )
155158
You can’t perform that action at this time.
0 commit comments