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 = {
26
26
child [ childKey ] = val
27
27
}
28
28
} , {
29
- sync : true ,
30
29
filters : prop . filters ,
31
30
// important: props need to be observed on the
32
31
// repeat scope if present
@@ -53,7 +52,7 @@ module.exports = {
53
52
childKey ,
54
53
function ( val ) {
55
54
parent . $set ( parentKey , val )
56
- } , { sync : true }
55
+ }
57
56
)
58
57
} )
59
58
}
Original file line number Diff line number Diff line change @@ -101,7 +101,7 @@ describe('Instance state initialization', function () {
101
101
expect ( vm . hasOwnProperty ( 'a' ) ) . toBe ( false )
102
102
} )
103
103
104
- it ( 'replace $data and handle props' , function ( ) {
104
+ it ( 'replace $data and handle props' , function ( done ) {
105
105
var el = document . createElement ( 'div' )
106
106
var vm = new Vue ( {
107
107
el : el ,
@@ -143,13 +143,16 @@ describe('Instance state initialization', function () {
143
143
expect ( child . a ) . toBe ( 2 )
144
144
expect ( child . b ) . toBe ( 3 )
145
145
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
+ } )
153
156
} )
154
157
} )
155
158
You can’t perform that action at this time.
0 commit comments