@types/react-addons-test-utils

  • Version 0.14.26
  • Published
  • 9.79 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 (react-addons-test-utils)

Index

Functions

function createRenderer

createRenderer: () => ShallowRenderer;

    function findAllInRenderedTree

    findAllInRenderedTree: (root: any, fn: (i: any) => boolean) => ReactInstance[];

      function findRenderedComponentWithType

      findRenderedComponentWithType: <T extends any, C extends any>(
      root: any,
      type: any
      ) => T;

        function findRenderedDOMComponentWithClass

        findRenderedDOMComponentWithClass: (root: any, className: string) => Element;

          function findRenderedDOMComponentWithTag

          findRenderedDOMComponentWithTag: (root: any, tagName: string) => Element;

            function isCompositeComponent

            isCompositeComponent: (instance: any) => instance is any;

              function isCompositeComponentWithType

              isCompositeComponentWithType: <T extends any, C extends any>(
              instance: any,
              type: any
              ) => T;

                function isDOMComponent

                isDOMComponent: (instance: any) => instance is Element;

                  function isElementOfType

                  isElementOfType: {
                  <T extends HTMLElement>(element: any, type: string): element is any;
                  <P extends any, T extends Element>(element: any, type: string): element is any;
                  <P>(element: any, type: any): element is any;
                  <P, T extends any, C extends any>(element: any, type: any): element is any;
                  };

                    function mockComponent

                    mockComponent: (
                    mocked: MockedComponentClass,
                    mockTagName?: string
                    ) => typeof TestUtils;

                      function renderIntoDocument

                      renderIntoDocument: {
                      <T extends Element>(element: any): T;
                      (element: any): void;
                      <T extends any>(element: any): T;
                      <P>(element: any): any;
                      };

                        function scryRenderedComponentsWithType

                        scryRenderedComponentsWithType: <T extends any, C extends any>(
                        root: any,
                        type: any
                        ) => T[];

                          function scryRenderedDOMComponentsWithClass

                          scryRenderedDOMComponentsWithClass: (root: any, className: string) => Element[];

                            function scryRenderedDOMComponentsWithTag

                            scryRenderedDOMComponentsWithTag: (root: 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 any>() => E;

                                                                    method render

                                                                    render: (element: any, 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 onejsDocs.io badgeto 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>