const fixture = await renderTemplate(
`<mj-tabstrip>
<mj-tab Name="A">Tab A</mj-tab>
<mj-tab-body>Body A</mj-tab-body>
</mj-tabstrip>`,
{ imports: [CommonModule], declarations: [MJTabStripComponent, MJTabComponent, MJTabBodyComponent] },
);
const tabs = fixture.nativeElement.querySelectorAll('.single-tab');
Render an arbitrary template (a composition of components) for compound / module-declared components — the case
renderComponentFixturecan't handle.It wraps your markup in a throwaway host component, declares it alongside the components you pass, configures the testing module, then drives change detection automatically and waits for it to settle (so components that refresh on a delay — their own async change detection — are stable before you assert).
Use this when a component takes projected children and/or is
standalone: false. For a single standalone component, prefer renderComponentFixture.