import { describe, expect, it, vi } from "vitest"; import { systemClock } from "../../src/application/ports/clock-port.js"; describe("systemClock", () => { it("resolves after the requested duration", async () => { vi.useFakeTimers(); const sleeper = systemClock.sleep(250); await vi.advanceTimersByTimeAsync(250); await expect(sleeper).resolves.toBeUndefined(); vi.useRealTimers(); }); });