Class TimeError

Represents an error when trying to execute an invalid operation on fake time, given the state fake time is in.

import { FakeTime, TimeError } from "@std/testing/time";
import { assertThrows } from "@std/assert";

assertThrows(() => {
const time = new FakeTime();
time.restore();
time.restore();
}, TimeError);
Hierarchy
  • Error
    • TimeError

Constructors

Properties

Constructors

Properties

cause?: unknown
message: string
name: string
stack?: string