Options
All
  • Public
  • Public/Protected
  • All
Menu

Class JestActionTester

An ActionTester class which is jest compatible

Hierarchy

Implements

Index

Constructors

Properties

Accessors

Methods

Constructors

constructor

Properties

Private jestFn

jestFn: any

Accessors

calls

Methods

add

dispatch

  • dispatch(action: TestAction | Function, done?: undefined | function): Promise<unknown>
  • Dispatches an action and recursively executes all thunks of an action and it's subsequent actions.

    Parameters

    • action: TestAction | Function

      TestAction | Function

    • Optional done: undefined | function

    Returns Promise<unknown>

    Promise

index

setArgs

  • setArgs(getState?: Function | null, extraArgument?: unknown): void
  • Sets the remaining 2 arguments of a thunk action.

    Parameters

    • Optional getState: Function | null

      Mock store.getState function

    • Optional extraArgument: unknown

      Mock values injected via thunk.withExtraArgument

    Returns void

    void

toSnapshot

  • toSnapshot(): string

toTracer

toTypes

  • toTypes(): string[]

Generated using TypeDoc