File tree Expand file tree Collapse file tree 1 file changed +25
-0
lines changed Expand file tree Collapse file tree 1 file changed +25
-0
lines changed Original file line number Diff line number Diff line change @@ -1613,6 +1613,31 @@ describe('SSR: renderToString', () => {
1613
1613
done ( )
1614
1614
} )
1615
1615
} )
1616
+
1617
+ it ( 'Options inheritAttrs in parent component' , done => {
1618
+ const childComponent = {
1619
+ template : `<div>{{ someProp }}</div>` ,
1620
+ props : {
1621
+ someProp : { }
1622
+ } ,
1623
+ }
1624
+ const parentComponent = {
1625
+ template : `<childComponent v-bind="$attrs" />` ,
1626
+ components : { childComponent } ,
1627
+ inheritAttrs : false
1628
+ }
1629
+ renderVmWithOptions ( {
1630
+ template : `
1631
+ <div>
1632
+ <parentComponent some-prop="some-val" />
1633
+ </div>
1634
+ ` ,
1635
+ components : { parentComponent }
1636
+ } , result => {
1637
+ expect ( result ) . toContain ( '<div data-server-rendered="true"><div>some-val</div></div>' )
1638
+ done ( )
1639
+ } )
1640
+ } )
1616
1641
} )
1617
1642
1618
1643
function renderVmWithOptions ( options , cb ) {
You can’t perform that action at this time.
0 commit comments