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); Copy
import { FakeTime, TimeError } from "@std/testing/time";import { assertThrows } from "@std/assert";assertThrows(() => { const time = new FakeTime(); time.restore(); time.restore();}, TimeError);
Construct TimeError.
The error message
Optional
Represents an error when trying to execute an invalid operation on fake time, given the state fake time is in.
Example: Usage