Options
All
  • Public
  • Public/Protected
  • All
Menu

Class TestScheduler

TestScheduler tries to mimic the javascript event loop and provides a low level API to manage the queue. You add add/remove new callbacks also run and then pause the execution for sometime.

Hierarchy

  • TestScheduler

Implements

Index

Constructors

Properties

Methods

Constructors

constructor

Properties

nextTick

nextTick: number = 1

Methods

asap

delay

  • delay<T>(fn: function, duration: number, ...args: T): ICancellable
  • Type parameters

    • T: unknown[]

    Parameters

    • fn: function
        • (...t: T): unknown
        • Parameters

          • Rest ...t: T

          Returns unknown

    • duration: number
    • Rest ...args: T

    Returns ICancellable

now

  • now(): number

run

  • run(): void

runBy

  • runBy(n: number): void

runTo

  • runTo(n: number): void

Generated using TypeDoc