File tree Expand file tree Collapse file tree 1 file changed +27
-0
lines changed
test/unit/specs/element-directives Expand file tree Collapse file tree 1 file changed +27
-0
lines changed Original file line number Diff line number Diff line change @@ -260,6 +260,33 @@ describe('Content Transclusion', function () {
260
260
} )
261
261
} )
262
262
263
+ it ( 'nested transclusion, container dirs & props' , function ( done ) {
264
+ vm = new Vue ( {
265
+ el : el ,
266
+ template :
267
+ '<testa>' +
268
+ '<testb v-if="ok" prop="{{msg}}"></testb>' +
269
+ '</testa>' ,
270
+ data : {
271
+ ok : false ,
272
+ msg : 'hello'
273
+ } ,
274
+ components : {
275
+ testa : { template : '<content></content>' } ,
276
+ testb : {
277
+ props : [ 'prop' ] ,
278
+ template : '{{prop}}'
279
+ }
280
+ }
281
+ } )
282
+ expect ( el . innerHTML ) . toBe ( '<testa></testa>' )
283
+ vm . ok = true
284
+ _ . nextTick ( function ( ) {
285
+ expect ( el . innerHTML ) . toBe ( '<testa><testb>hello</testb></testa>' )
286
+ done ( )
287
+ } )
288
+ } )
289
+
263
290
it ( 'single content outlet with replace: true' , function ( ) {
264
291
vm = new Vue ( {
265
292
el : el ,
You can’t perform that action at this time.
0 commit comments