diff --git a/packages/@ember/-internals/glimmer/tests/integration/components/angle-bracket-invocation-test.js b/packages/@ember/-internals/glimmer/tests/integration/components/angle-bracket-invocation-test.js index eeb243aa60c..811e58846f0 100644 --- a/packages/@ember/-internals/glimmer/tests/integration/components/angle-bracket-invocation-test.js +++ b/packages/@ember/-internals/glimmer/tests/integration/components/angle-bracket-invocation-test.js @@ -919,6 +919,41 @@ if (EMBER_GLIMMER_ANGLE_BRACKET_INVOCATION) { content: 'world', }); } + + '@test can yield content to contextual components invoked with angle-bracket components that receives splattributes'() { + this.registerComponent('foo-bar/inner', { + ComponentClass: Component.extend({ tagName: '' }), + template: '

{{yield}}

', + }); + this.registerComponent('foo-bar', { + ComponentClass: Component.extend({ tagName: '' }), + // If doesn't receive splattributes this test passes + template: strip` + {{#let (component "foo-bar/inner") as |Inner|}} + {{yield}} +

Inside the let

+ {{/let}} +

Outside the let

+ `, + }); + + this.render('Yielded content'); + this.assertElement(this.firstChild, { + tagName: 'h1', + attrs: {}, + content: 'Yielded content', + }); + this.assertElement(this.nthChild(1), { + tagName: 'h2', + attrs: {}, + content: 'Inside the let', + }); + this.assertElement(this.nthChild(2), { + tagName: 'h3', + attrs: {}, + content: 'Outside the let', + }); + } } ); }