import { describe, expectTypeOf, it } from "@suaveplan/testing/runner"; import type { MutexRelease, PluginMutex } from "./mutex-contract.js"; describe("mutex-contract spec-conformance", () => { it("PluginMutex declares acquire tryAcquire", { timeout: 5000 }, () => { expectTypeOf().toHaveProperty("acquire"); expectTypeOf().toHaveProperty("tryAcquire"); expectTypeOf().toEqualTypeOf< (plugin: string) => Promise >(); expectTypeOf().toEqualTypeOf< (plugin: string) => MutexRelease | null >(); }); it("MutexRelease declares release", { timeout: 5000 }, () => { expectTypeOf().toHaveProperty("release"); expectTypeOf().toEqualTypeOf<() => void>(); }); });