import type { Cache } from "@rotorsoft/act/types"; /** * Options for {@link runCacheTck}. */ export type CacheTckOptions = { /** * Display name for the implementation under test. Becomes the * top-level `describe` block in the vitest run. */ readonly name: string; /** * Factory invoked before each test. Must return a fresh, empty cache * — tests assume zero starting entries. Any per-implementation tuning * (max size, TTL, etc.) is the factory's responsibility, but the TCK * itself sets ≤ 8 entries in any single test, so a default max of * `≥ 8` is safe. */ readonly factory: () => Cache; }; /** * Runs the Cache contract test compatibility kit against the * implementation produced by `options.factory`. * * Covers the full {@link Cache} surface defined in * `libs/act/src/types/ports.ts`: * - get/set round-trip * - get on a missing key returns undefined * - invalidate removes a single stream without affecting others * - clear wipes all entries * - dispose is idempotent and awaitable * - cross-stream isolation * * Adapter-specific behavior (LRU ordering, TTL, size limits, …) stays * in the adapter's own test suite — the TCK only asserts the contract * every Cache must honor. * * @example * ```ts * import { runCacheTck } from "@rotorsoft/act-tck"; * import { InMemoryCache } from "@rotorsoft/act"; * * runCacheTck({ * name: "InMemoryCache", * factory: () => new InMemoryCache({ maxSize: 1000 }), * }); * ``` */ export declare const runCacheTck: (options: CacheTckOptions) => void; //# sourceMappingURL=cache-tck.d.ts.map