Skip to content
GitHub

MockResult

interface in meocord/testing Since 4.0.0

interface MockResult<T = unknown>

One call's outcome, as a mock function records it: the value it returned, or the error it threw.

Members

type

type: 'return' | 'throw' | 'incomplete'

'return' when the call returned, 'throw' when it threw, 'incomplete' while it is still running.

value

value: T

What the call returned, or the error it threw; undefined while it is incomplete.

See also