rimmel
Version:
A Streams-Oriented UI library for the Rx.Observable Universe
26 lines • 1.08 kB
TypeScript
export interface MockElement extends HTMLElement {
dataset: DOMStringMap;
checked?: boolean;
disabled?: boolean;
style: CSSStyleDeclaration;
value: string;
innerText: string;
innerHTML: string;
textContent: string;
readOnly?: boolean;
remove: () => void;
selectedIndex?: number;
setAttribute(name: string, value: string): void;
getAttribute(name: string): string | null;
hasAttribute: (name: string) => boolean;
removeAttribute(name: string): void;
className: string;
insertAdjacentHTML(pos: InsertPosition, html: string): void;
addEventListener(eventName: string, handler: EventListenerOrEventListenerObject): void;
removeEventListener(eventName: string, handler: EventListenerOrEventListenerObject): void;
dispatchEvent(event: Event): boolean;
childNodes: NodeListOf<ChildNode>;
}
export declare const MockElement: (props?: Record<string, any>) => MockElement;
export declare const MockEvent: <E extends Event>(name: string, data: Partial<E>) => E;
//# sourceMappingURL=test-support.d.ts.map