Home Reference Source
import {IntegrationTestHelper} from 'react-redux-test-utils'
public class | since 0.1.0 | source

IntegrationTestHelper

Integration test helper

Static Method Summary

Static Public Methods
public static

Wait for all the promises in the test to get resolved

Constructor Summary

Public Constructor
public

constructor(reducers: ReduxReducers, middlewares: ReduxMiddlewares)

Create an integration-test-helper

Method Summary

Public Methods
public

Get a list with all dispach calls

public

Get the last dispach call

public

Get the current state object

public

mount(component: ReactNode): EnzymeMount

Mount a component with the store

public

takeActionsSnapshot(description: string)

Take a snapshot of all the actions

public

Take a snapshot of the last called action

public

Take a snapshot of the store together with the last action call

public

takeStoreSnapshot(description: string)

Take a store snapshot

Static Public Methods

public static flushAllPromises(): Promise source

Wait for all the promises in the test to get resolved

Return:

Promise

Public Constructors

public constructor(reducers: ReduxReducers, middlewares: ReduxMiddlewares) source

Create an integration-test-helper

Params:

NameTypeAttributeDescription
reducers ReduxReducers

reducers to apply

middlewares ReduxMiddlewares

array of middlewares to apply

Public Methods

public getDispatchCalls(): Array source

Get a list with all dispach calls

Return:

Array

Dispach calls

public getLastDispachCall(): Array source

Get the last dispach call

Return:

Array

dispach call

public getState(): Object source

Get the current state object

Return:

Object

Current state

public mount(component: ReactNode): EnzymeMount source

Mount a component with the store

Params:

NameTypeAttributeDescription
component ReactNode

A react node to mount

Return:

EnzymeMount

Mounted component with enzyme and redux store

public takeActionsSnapshot(description: string) source

Take a snapshot of all the actions

Params:

NameTypeAttributeDescription
description string

Snapshoot description

public takeLastActionSnapshot(description: string) source

Take a snapshot of the last called action

Params:

NameTypeAttributeDescription
description string

Snapshoot description

public takeStoreAndLastActionSnapshot(description: string) source

Take a snapshot of the store together with the last action call

Params:

NameTypeAttributeDescription
description string

Snapshot description

public takeStoreSnapshot(description: string) source

Take a store snapshot

Params:

NameTypeAttributeDescription
description string

Snapshoot description