office-ui-fabric-react
Version:
Reusable React components for building experiences for Office 365.
18 lines (17 loc) • 1.23 kB
TypeScript
/// <reference types="react" />
import { ReactWrapper } from 'enzyme';
import { Component } from 'react';
import * as ReactTestUtils from 'react-dom/test-utils';
export declare type __TS_2_8_WORKAROUND_COMPONENT__ = Component;
export declare function findNodes(wrapper: ReactWrapper<any, any>, className: string): ReactWrapper<any, any>;
export declare function expectNodes(wrapper: ReactWrapper<any, any>, className: string, n: number): void;
export declare function expectOne(wrapper: ReactWrapper<any, any>, className: string): void;
export declare function expectMissing(wrapper: ReactWrapper<any, any>, className: string): void;
export declare function delay(millisecond: number): Promise<void>;
/**
* Mounts the element attached to a child of document.body. This is primarily for tests involving
* event handlers (which don't work right unless the element is attached).
*/
export declare function mountAttached<C extends Component, P = C['props'], S = C['state']>(element: React.ReactElement<P>): ReactWrapper<P, S, C>;
export declare function renderIntoDocument(element: React.ReactElement<any>): HTMLElement;
export declare function mockEvent(targetValue?: string): ReactTestUtils.SyntheticEventData;