async function litFixture(template, options = {}) {
  /** @type {import('./scopedElementsWrapper.js').ScopedElementsTemplateGetter|undefined} */
  const getScopedElementsTemplate = options.scopedElements
    ? await import('./scopedElementsWrapper.js').then(
        scopedElementWrapper => scopedElementWrapper.getScopedElementsTemplate,
      )
    : undefined;
  /** @type {T} */
  // NB: in the case of scopedElements, this is ScopedElementsTestWrapper, not T,
  // but that's only a small lie
  const el = litFixtureSync(template, options, getScopedElementsTemplate);
  await elementUpdated(el);

  if (options.scopedElements) {
    const [node] =
      /** @type {T[]} */
      (Array.from(el.shadowRoot.childNodes).filter(isUsefulNode));
    await elementUpdated(node);

    return node;
  }

  return el;
}
Setups an element asynchronously from the provided lit-html template and puts it in the DOM.

@template {Element} T - Is an element or a node
@param {import('./renderable.js').LitHTMLRenderable} template
@param {import('./fixture-no-side-effect.js').FixtureOptions} [options]
@returns {Promise<T>}