@types/react-addons-test-utils
- Version 15.6.4
- Published
- 9.69 kB
- 1 dependency
- MIT license
Install
npm i @types/react-addons-test-utils
yarn add @types/react-addons-test-utils
pnpm add @types/react-addons-test-utils
Overview
TypeScript definitions for react-addons-test-utils
Index
Functions
- createRenderer()
- findAllInRenderedTree()
- findRenderedComponentWithType()
- findRenderedDOMComponentWithClass()
- findRenderedDOMComponentWithTag()
- isCompositeComponent()
- isCompositeComponentWithType()
- isDOMComponent()
- isElementOfType()
- mockComponent()
- renderIntoDocument()
- scryRenderedComponentsWithType()
- scryRenderedDOMComponentsWithClass()
- scryRenderedDOMComponentsWithTag()
Interfaces
Namespaces
Functions
function createRenderer
createRenderer: () => ShallowRenderer;
function findAllInRenderedTree
findAllInRenderedTree: ( root: Component<any>, fn: (i: ReactInstance) => boolean) => ReactInstance[];
function findRenderedComponentWithType
findRenderedComponentWithType: < T extends Component<any>, C extends ComponentClass<any>>( root: Component<any>, type: ClassType<any, T, C>) => T;
function findRenderedDOMComponentWithClass
findRenderedDOMComponentWithClass: ( root: Component<any>, className: string) => Element;
function findRenderedDOMComponentWithTag
findRenderedDOMComponentWithTag: ( root: Component<any>, tagName: string) => Element;
function isCompositeComponent
isCompositeComponent: (instance: ReactInstance) => instance is Component<any>;
function isCompositeComponentWithType
isCompositeComponentWithType: < T extends Component<any>, C extends ComponentClass<any>>( instance: ReactInstance, type: ClassType<any, T, C>) => T;
function isDOMComponent
isDOMComponent: (instance: ReactInstance) => instance is Element;
function isElementOfType
isElementOfType: { <T extends HTMLElement>( element: ReactElement, type: string ): element is ReactHTMLElement<T>; <P extends DOMAttributes<{}>, T extends Element>( element: ReactElement, type: string ): element is DOMElement<P, T>; <P>(element: ReactElement, type: SFC<P>): element is SFCElement<P>; <P, T extends Component<P>, C extends ComponentClass<P>>( element: ReactElement, type: ClassType<P, T, C> ): element is CElement<P, T>;};
function mockComponent
mockComponent: ( mocked: MockedComponentClass, mockTagName?: string) => typeof TestUtils;
function renderIntoDocument
renderIntoDocument: { <T extends Element>(element: DOMElement<any, T>): T; (element: SFCElement<any>): void; <T extends Component<any>>(element: CElement<any, T>): T; <P>(element: ReactElement<P>): any;};
function scryRenderedComponentsWithType
scryRenderedComponentsWithType: < T extends Component<any>, C extends ComponentClass<any>>( root: Component<any>, type: ClassType<any, T, C>) => T[];
function scryRenderedDOMComponentsWithClass
scryRenderedDOMComponentsWithClass: ( root: Component<any>, className: string) => Element[];
function scryRenderedDOMComponentsWithTag
scryRenderedDOMComponentsWithTag: ( root: Component<any>, tagName: string) => Element[];
Interfaces
interface EventSimulator
interface EventSimulator {}
call signature
(element: Element | Component<any>, eventData?: SyntheticEventData): void;
interface MockedComponentClass
interface MockedComponentClass {}
construct signature
new (): any;
interface OptionalEventProperties
interface OptionalEventProperties {}
property bubbles
bubbles?: boolean | undefined;
property cancelable
cancelable?: boolean | undefined;
property currentTarget
currentTarget?: EventTarget | undefined;
property defaultPrevented
defaultPrevented?: boolean | undefined;
property eventPhase
eventPhase?: number | undefined;
property isTrusted
isTrusted?: boolean | undefined;
property nativeEvent
nativeEvent?: Event | undefined;
property target
target?: EventTarget | undefined;
property timeStamp
timeStamp?: Date | undefined;
property type
type?: string | undefined;
method preventDefault
preventDefault: () => void;
method stopPropagation
stopPropagation: () => void;
interface ShallowRenderer
interface ShallowRenderer {}
method getRenderOutput
getRenderOutput: <E extends ReactElement>() => E;
method render
render: (element: ReactElement, context?: any) => void;
method unmount
unmount: () => void;
interface SyntheticEventData
interface SyntheticEventData extends OptionalEventProperties {}
property altKey
altKey?: boolean | undefined;
property button
button?: number | undefined;
property buttons
buttons?: number | undefined;
property changedTouches
changedTouches?: TouchList | undefined;
property charCode
charCode?: boolean | undefined;
property clientX
clientX?: number | undefined;
property clientY
clientY?: number | undefined;
property clipboardData
clipboardData?: DataTransfer | undefined;
property ctrlKey
ctrlKey?: boolean | undefined;
property deltaMode
deltaMode?: number | undefined;
property deltaX
deltaX?: number | undefined;
property deltaY
deltaY?: number | undefined;
property deltaZ
deltaZ?: number | undefined;
property detail
detail?: number | undefined;
property key
key?: string | undefined;
property keyCode
keyCode?: number | undefined;
property locale
locale?: string | undefined;
property location
location?: number | undefined;
property metaKey
metaKey?: boolean | undefined;
property pageX
pageX?: number | undefined;
property pageY
pageY?: number | undefined;
property relatedTarget
relatedTarget?: EventTarget | undefined;
property repeat
repeat?: boolean | undefined;
property screenX
screenX?: number | undefined;
property screenY
screenY?: number | undefined;
property shiftKey
shiftKey?: boolean | undefined;
property targetTouches
targetTouches?: TouchList | undefined;
property touches
touches?: TouchList | undefined;
property view
view?: AbstractView | undefined;
property which
which?: number | undefined;
method getModifierState
getModifierState: (key: string) => boolean;
Namespaces
namespace Simulate
namespace Simulate {}
variable blur
var blur: EventSimulator;
variable change
var change: EventSimulator;
variable click
var click: EventSimulator;
variable contextMenu
var contextMenu: EventSimulator;
variable copy
var copy: EventSimulator;
variable cut
var cut: EventSimulator;
variable doubleClick
var doubleClick: EventSimulator;
variable drag
var drag: EventSimulator;
variable dragEnd
var dragEnd: EventSimulator;
variable dragEnter
var dragEnter: EventSimulator;
variable dragExit
var dragExit: EventSimulator;
variable dragLeave
var dragLeave: EventSimulator;
variable dragOver
var dragOver: EventSimulator;
variable dragStart
var dragStart: EventSimulator;
variable drop
var drop: EventSimulator;
variable error
var error: EventSimulator;
variable focus
var focus: EventSimulator;
variable input
var input: EventSimulator;
variable keyDown
var keyDown: EventSimulator;
variable keyPress
var keyPress: EventSimulator;
variable keyUp
var keyUp: EventSimulator;
variable load
var load: EventSimulator;
variable mouseDown
var mouseDown: EventSimulator;
variable mouseEnter
var mouseEnter: EventSimulator;
variable mouseLeave
var mouseLeave: EventSimulator;
variable mouseMove
var mouseMove: EventSimulator;
variable mouseOut
var mouseOut: EventSimulator;
variable mouseOver
var mouseOver: EventSimulator;
variable mouseUp
var mouseUp: EventSimulator;
variable paste
var paste: EventSimulator;
variable scroll
var scroll: EventSimulator;
variable submit
var submit: EventSimulator;
variable touchCancel
var touchCancel: EventSimulator;
variable touchEnd
var touchEnd: EventSimulator;
variable touchMove
var touchMove: EventSimulator;
variable touchStart
var touchStart: EventSimulator;
variable wheel
var wheel: EventSimulator;
Package Files (1)
Dependencies (1)
Dev Dependencies (0)
No dev dependencies.
Peer Dependencies (0)
No peer dependencies.
Badge
To add a badge like this oneto your package's README, use the codes available below.
You may also use Shields.io to create a custom badge linking to https://www.jsdocs.io/package/@types/react-addons-test-utils
.
- Markdown[![jsDocs.io](https://img.shields.io/badge/jsDocs.io-reference-blue)](https://www.jsdocs.io/package/@types/react-addons-test-utils)
- HTML<a href="https://www.jsdocs.io/package/@types/react-addons-test-utils"><img src="https://img.shields.io/badge/jsDocs.io-reference-blue" alt="jsDocs.io"></a>
- Updated .
Package analyzed in 4407 ms. - Missing or incorrect documentation? Open an issue for this package.