DEV: Avoid extra whitespace in rawRenderGlimmer (#27272)
This commit is contained in:
parent
81fe4ed248
commit
faad8842d4
|
@ -7,10 +7,12 @@ export default class RenderGlimmerContainer extends Component {
|
|||
<template>
|
||||
{{#each this.renderGlimmer._registrations as |info|}}
|
||||
{{#in-element info.element insertBefore=null}}
|
||||
{{~! no whitespace ~}}
|
||||
<info.component
|
||||
@data={{info.data}}
|
||||
@setWrapperElementAttrs={{info.setWrapperElementAttrs}}
|
||||
/>
|
||||
{{~! no whitespace ~}}
|
||||
{{/in-element}}
|
||||
{{/each}}
|
||||
</template>
|
||||
|
|
|
@ -89,4 +89,19 @@ module("Integration | Helper | raw", function (hooks) {
|
|||
|
||||
assert.true(willDestroyCalled, "component was cleaned up correctly");
|
||||
});
|
||||
|
||||
test("does not add extra whitespace", async function (assert) {
|
||||
const SimpleTemplate = <template>baz</template>;
|
||||
|
||||
addRawTemplate("raw-test", () =>
|
||||
rawRenderGlimmer(this, "span.bar", SimpleTemplate)
|
||||
);
|
||||
|
||||
await render(<template>
|
||||
<RenderGlimmerContainer />
|
||||
{{raw "raw-test"}}
|
||||
</template>);
|
||||
|
||||
assert.dom("span.bar").hasText(/^baz$/);
|
||||
});
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue