File tree 1 file changed +13
-1
lines changed
test/specs/mounting-options
1 file changed +13
-1
lines changed Original file line number Diff line number Diff line change @@ -113,9 +113,17 @@ describeWithShallowAndMount('options.sync', (mountingMethod) => {
113
113
} )
114
114
115
115
it ( 'call updated when sync is not false' , ( ) => {
116
+ const fooSpy = sinon . stub ( )
117
+ const Foo = {
118
+ template : '<div>{{ foo }}</div>' ,
119
+ props : [ 'foo' ] ,
120
+ updated ( ) {
121
+ fooSpy ( )
122
+ }
123
+ }
116
124
const spy = sinon . stub ( )
117
125
const TestComponent = {
118
- template : '<div>{{ foo }}</div>' ,
126
+ template : '<div>{{ foo }}<foo :foo="foo" />< /div>' ,
119
127
data ( ) {
120
128
return {
121
129
foo : 'foo'
@@ -126,10 +134,14 @@ describeWithShallowAndMount('options.sync', (mountingMethod) => {
126
134
}
127
135
}
128
136
const wrapper = mountingMethod ( TestComponent , {
137
+ stubs : { foo : Foo } ,
129
138
sync : true
130
139
} )
131
140
expect ( spy . notCalled ) . to . equal ( true )
141
+ expect ( fooSpy . notCalled ) . to . equal ( true )
132
142
wrapper . vm . foo = 'bar'
133
143
expect ( spy . calledOnce ) . to . equal ( true )
144
+ expect ( fooSpy . calledOnce ) . to . equal ( true )
145
+ expect ( wrapper . html ( ) ) . to . equal ( '<div>bar<div>bar</div></div>' )
134
146
} )
135
147
} )
You can’t perform that action at this time.
0 commit comments