UNPKG

riot-test-utils

Version:
37 lines (36 loc) 972 B
export default class WeakWrapper { private nodeList; private readonly elements; constructor(nodeList: NodeListOf<Element>); readonly instance: null; readonly root: Element; /** * Simulate firing an event on all of the elements * * @param type event type * @param options options to override event object */ simulate<T extends {}>(type: string, options?: T): void; get(index: number): Element; get(): ReadonlyArray<Element>; readonly length: number; find(selector: string): WeakWrapper; /** * Get internal text content * * @throws {Error} unless single */ text(): string | null; /** * Get outer-HTML string * * @throws {Error} unless single */ html(): string; /** * Convert to JSON form to generate snapshot */ toJSON(): object | object[]; private isSingle(); private assertSingle(); }