Render a Lit template and wait for any Components inside it to stabilise before returning the HTMLElement containing the rendered template.
The root element is also a Disposable which will remove itself from the DOM and dispose its Components when disposed.
using root = await testHTML(html`<my-component></my-component>`);expect(root.querySelector("my-component")).toBeInstanceOf(MyComponent); Copy
using root = await testHTML(html`<my-component></my-component>`);expect(root.querySelector("my-component")).toBeInstanceOf(MyComponent);
Render a Lit template and wait for any Components inside it to stabilise before returning the HTMLElement containing the rendered template.
The root element is also a Disposable which will remove itself from the DOM and dispose its Components when disposed.