chore: initialize from frontend template 4dc033c

This commit is contained in:
DongHyeonka
2026-08-13 18:23:26 +09:00
commit 40107eec84
897 changed files with 234824 additions and 0 deletions
+18
View File
@@ -0,0 +1,18 @@
import { describe, expect, it, vi } from "vitest";
import { systemClock } from "../../src/adapters/platform/system-clock.ts";
describe("systemClock", () => {
it("resolves after the requested duration", async () => {
vi.useFakeTimers();
const caller = new AbortController();
const add = vi.spyOn(caller.signal, "addEventListener");
const remove = vi.spyOn(caller.signal, "removeEventListener");
const sleeper = systemClock.sleep(250, caller.signal);
await vi.advanceTimersByTimeAsync(250);
await expect(sleeper).resolves.toBeUndefined();
expect(add).toHaveBeenCalledOnce();
expect(remove).toHaveBeenCalledOnce();
vi.useRealTimers();
});
});