Outlook_Addin_LLM/node_modules/@fluentui/react/lib/common/testUtilities.d.ts

27 lines
1.6 KiB
TypeScript

import * as React from 'react';
import { ReactWrapper } from 'enzyme';
import * as ReactTestUtils from 'react-dom/test-utils';
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;
/** @deprecated Use fake timers and `jest.runAllTimers()` instead */
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).
* @deprecated Use `safeMount` from `@fluentui/test-utilities` instead
*/
export declare function mountAttached<C extends React.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;
/**
* Hack for forcing Jest to run pending promises
* https://github.com/facebook/jest/issues/2157#issuecomment-897935688
*/
export declare function flushPromises(): Promise<void>;
/**
* Verify that the given element and its parents do NOT have `aria-hidden` set.
*/
export declare function expectNoHiddenParents(element: HTMLElement): void;