@narottamdev/component-test-utils
Version:
Universal testing utilities for component libraries across different frameworks
40 lines • 1.57 kB
TypeScript
export declare class ComponentAssertions {
static toBeInDocument(element: Element | null): void;
static toBeVisible(element: Element | null): void;
static toHaveTextContent(element: Element | null, text: string): void;
static toHaveAttribute(element: Element | null, attr: string, value?: string): void;
static toHaveClass(element: Element | null, className: string): void;
static toHaveStyle(element: Element | null, styles: Record<string, any>): void;
static toBeDisabled(element: Element | null): void;
static toBeEnabled(element: Element | null): void;
static toHaveFocus(element: Element | null): void;
static toBeChecked(element: Element | null): void;
static toHaveValue(element: Element | null, value: any): void;
}
export declare const customMatchers: {
toBeInDocument(received: Element | null): {
pass: boolean;
message: () => any;
};
toBeVisible(received: Element | null): {
pass: boolean;
message: () => any;
};
toHaveTextContent(received: Element | null, text: string): {
pass: boolean;
message: () => any;
};
toHaveAttribute(received: Element | null, attr: string, value?: string): {
pass: boolean;
message: () => any;
};
toHaveClass(received: Element | null, className: string): {
pass: boolean;
message: () => any;
};
toHaveStyle(received: Element | null, styles: Record<string, any>): {
pass: boolean;
message: () => any;
};
};
//# sourceMappingURL=assertions.d.ts.map