Interface SinonFakeTimers

Index

Properties

Methods

Properties

public now: number

Methods

public Date(): Date

Returns

Date

public Date(year: number): Date

Parameters

  • year: number

Returns

Date

public Date(year: number, month: number): Date

Parameters

  • year: number
  • month: number

Returns

Date

public Date(year: number, month: number, day: number): Date

Parameters

  • year: number
  • month: number
  • day: number

Returns

Date

public Date(year: number, month: number, day: number, hour: number): Date

Parameters

  • year: number
  • month: number
  • day: number
  • hour: number

Returns

Date

public Date(year: number, month: number, day: number, hour: number, minute: number): Date

Parameters

  • year: number
  • month: number
  • day: number
  • hour: number
  • minute: number

Returns

Date

public Date(year: number, month: number, day: number, hour: number, minute: number, second: number): Date

Parameters

  • year: number
  • month: number
  • day: number
  • hour: number
  • minute: number
  • second: number

Returns

Date

public Date(year: number, month: number, day: number, hour: number, minute: number, second: number, ms: number): Date

Parameters

  • year: number
  • month: number
  • day: number
  • hour: number
  • minute: number
  • second: number
  • ms: number

Returns

Date

public clearInterval(id: number)

Parameters

  • id: number

public clearTimeout(id: number)

Parameters

  • id: number

public create(now: number): SinonFakeTimers

Parameters

  • now: number

Returns

SinonFakeTimers

public reset()

public restore()

public setInterval(callback: (...args: any[]) => void, timeout: number, args?: Array<any>): number

Parameters

  • callback: (...args: any[]) => void
  • timeout: number
  • args?: Array<any> optional

Returns

number

public setTimeout(callback: (...args: any[]) => void, timeout: number, args?: Array<any>): number

Parameters

  • callback: (...args: any[]) => void
  • timeout: number
  • args?: Array<any> optional

Returns

number

public tick(ms: number): number

Parameters

  • ms: number

Returns

number