Skip to main content

Function: mount()

mount<T>(tag, properties?, content?): Promise<T>

Defined in: src/testing/elements.ts:9

Create a custom element, set its properties, add it to the page and wait for it to render.

Type Parameters​

T​

T extends LitElement

Parameters​

tag​

string

properties?​

Partial<T> = {}

content?​

string = ""

Returns​

Promise<T>

Example​

const button = await mount<PcButton>("pc-button", { variant: "cancel" });