runStoreTck
@rotorsoft/act-root / act-tck/src / runStoreTck
Function: runStoreTck()
runStoreTck(
options):void
Defined in: libs/act-tck/src/store-tck.ts:188
Runs the Store contract test compatibility kit against the
implementation produced by options.factory.
The TCK is the executable definition of the Store contract.
Every method on the interface in libs/act/src/types/ports.ts has
matching cases here:
commitโ single + multi-event commits, optimistic concurrencyqueryโ stream, names, correlation, before, after, created_after, created_before, limit, with_snaps, stream_exact, backward traversal- stream filter grammar โ the portable regex subset (
^,$,.,.*, literal characters) matches identically everywhere; richer patterns either match with full regex semantics or throwValidationErrorโ never a silent approximation subscribeโ idempotent re-subscribe, watermark return valueclaim/ackโ lease lifecycle, dual frontiers, leased streams not double-claimed, exact-source has-work matching, timed-out-lease retry accountingblockโ blocked streams hidden from claim, only same-drainer can blockresetโ restart watermarks (including blocked), no-op for missingprioritizeโ bulk priority updates by filtertruncateโ snapshot vs tombstone seeding, empty inputs, missing streams; windowed boundaries (before/max_id) โ prefix deleted behind the closest safe snapshot, tail + subscriptions kept, no-snapshot no-op, mixed full + windowed targetsquery_streamsโ filters, exact-match, pagination, blockednotify(capability-gated) โ cross-instance delivery, self-filtering (an instance never receives its own commits), one notification per commit transaction with the full event batch
Tests namespace their streams with a per-test uid so the suite is parallel-safe against a shared backing store (e.g., a real Postgres instance running tests for the whole monorepo concurrently).
Parametersโ
optionsโ
Returnsโ
void
Exampleโ
import { runStoreTck } from "@rotorsoft/act-tck";
import { InMemoryStore } from "@rotorsoft/act";
runStoreTck({
name: "InMemoryStore",
factory: () => new InMemoryStore(),
});