Interface Calls

Index

Methods

Methods

public all(): any

By chaining the spy with calls.all(), will return the context (the this) and arguments passed all calls

Returns

any

public allArgs(): Array<any>

By chaining the spy with calls.allArgs(), will return the arguments to all calls

Returns

Array<any>

public any(): boolean

By chaining the spy with calls.any(), will return false if the spy has not been called at all, and then true once at least one call happens.

Returns

boolean

public argsFor(index: number): Array<any>

By chaining the spy with calls.argsFor(), will return the arguments passed to call number index

Parameters

  • index: number

Returns

Array<any>

public count(): number

By chaining the spy with calls.count(), will return the number of times the spy was called

Returns

number

public first(): any

By chaining the spy with calls.first(), will return the context (the this) and arguments for the first call

Returns

any

public mostRecent(): any

By chaining the spy with calls.mostRecent(), will return the context (the this) and arguments for the most recent call

Returns

any

public reset()

By chaining the spy with calls.reset(), will clears all tracking for a spy