@bitsinfra/fusee
    Preparing search index...

    Class TestEngine

    Index
    engine: Engine

    The engine under test (a new one after crash()).

    • Moves the clock forward: timers that fall due fire.

      Parameters

      Returns Promise<void>

    • Strict replay of every run against the registered code: throws DeterminismError naming each run and step whose code differs from its journal.

      Returns Promise<void>

    • Returns Promise<void>

    • Drops the engine's memory as a crash would and recovers: a new engine loads every run from its journal, the code replays, and runs continue. Recorded steps do not run again.

      Parameters

      • opts: { cut?: { beforeStep: number; id: string } } = {}

      Returns Promise<void>

    • Replaces a step's function: fn(attempt) returns its result, or throws to fail that attempt.

      Parameters

      Returns void

    • The virtual time, Unix ms.

      Returns number

    • The run's result. While every run waits on a timer, time skips to it, so a workflow that sleeps a day finishes at once.

      Type Parameters

      • O = unknown

      Parameters

      • id: string

      Returns Promise<O>

    • Type Parameters

      • O = unknown

      Parameters

      • id: string

      Returns Run<O>

    • The run's journal without times or run IDs, for snapshot tests.

      Parameters

      • id: string

      Returns Promise<JournalRecord[]>

    • The names of the steps the run recorded, in order.

      Parameters

      • id: string

      Returns Promise<string[]>