Namespace: calls

Spy#calls

Methods

all() → {Array.<Spy.callData>}

Get the raw calls array for this spy.
Source:
Returns:
Type
Array.<Spy.callData>

allArgs() → {Array}

Get all of the arguments for each invocation of this spy in the order they were received.
Source:
Returns:
Type
Array

any() → {Boolean}

Check whether this spy has been invoked.
Source:
Returns:
Type
Boolean

argsFor(index) → {Array}

Get the arguments that were passed to a specific invocation of this spy.
Parameters:
Name Type Description
index Integer The 0-based invocation index.
Source:
Returns:
Type
Array

count() → {Integer}

Get the number of invocations of this spy.
Source:
Returns:
Type
Integer

first() → {ObjecSpy.callData}

Get the first invocation of this spy.
Source:
Returns:
Type
ObjecSpy.callData

mostRecent() → {ObjecSpy.callData}

Get the most recent invocation of this spy.
Source:
Returns:
Type
ObjecSpy.callData

reset()

Reset this spy as if it has never been called.
Source:

saveArgumentsByValue()

Set this spy to do a shallow clone of arguments passed to each invocation.
Source: