@bodil/dom
    Preparing search index...

    Function testHTML

    • 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.

      Parameters

      • template: unknown

      Returns Promise<HTMLElement & Disposable>

      using root = await testHTML(html`<my-component></my-component>`);
      expect(root.querySelector("my-component")).toBeInstanceOf(MyComponent);