Skip to main content

Interface: ActionFactoryMock<Args, Context, Extension>

Mock for an action factory with mocked results and ran context history.

Type parameters

Args extends any[]

Context extends object

Extension extends object

Properties

history

readonly history: readonly ActionMockedHistoryItem[]

Source

packages/test/src/types.ts:53


makeAction()

makeAction: (...args) => Action<Context, Extension>

Parameters

• ...args: Args

Returns

Action<Context, Extension>

Source

packages/test/src/types.ts:54


mockResult()

mockResult: <RC>(result?, predicate?) => void

Type parameters

RC extends object = any

Parameters

result?: unknown

predicate?: ActionMockedPredicate<RC>

Returns

void

Source

packages/test/src/types.ts:55


mockResultOnce()

mockResultOnce: <RC>(result?, predicate?, options?) => void

Type parameters

RC extends object = any

Parameters

result?: unknown

predicate?: ActionMockedPredicate<RC>

options?: ActionMockedRunOptions<RC>

Returns

void

Source

packages/test/src/types.ts:59


mockResultTimes()

mockResultTimes: <RC>(times, result?, predicate?, options?) => void

Type parameters

RC extends object = any

Parameters

times: number

result?: unknown

predicate?: ActionMockedPredicate<RC>

options?: ActionMockedRunOptions<RC>

Returns

void

Source

packages/test/src/types.ts:69


mockResultTwice()

mockResultTwice: <RC>(result?, predicate?, options?) => void

Type parameters

RC extends object = any

Parameters

result?: unknown

predicate?: ActionMockedPredicate<RC>

options?: ActionMockedRunOptions<RC>

Returns

void

Source

packages/test/src/types.ts:64


reset()

reset: () => void

Returns

void

Source

packages/test/src/types.ts:77


resetHistory()

resetHistory: () => void

Returns

void

Source

packages/test/src/types.ts:76


resetMocks()

resetMocks: () => void

Returns

void

Source

packages/test/src/types.ts:75