Options
All
  • Public
  • Public/Protected
  • All
Menu

Type parameters

Hierarchy

  • Calls

Index

Methods

all

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

    Returns ReadonlyArray<CallInfo<Fn>>

allArgs

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

    Returns ReadonlyArray<Parameters<Fn>>

any

  • 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

argsFor

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

    Parameters

    • index: number

    Returns Parameters<Fn>

count

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

    Returns number

first

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

    Returns CallInfo<Fn>

mostRecent

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

    Returns CallInfo<Fn>

reset

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

    Returns void

saveArgumentsByValue

  • saveArgumentsByValue(): void
  • Set this spy to do a shallow clone of arguments passed to each invocation.

    Returns void

Generated using TypeDoc