import { describe as desc } from "@std/testing/bdd"; import { EventFactory } from "../../libraries/event-factory.ts"; import { EventStore, type EventStoreHooks } from "../../libraries/event-store.ts"; import { Projector } from "../../libraries/projector.ts"; export function describe( name: string, runner: (getEventStore: EventStoreFn) => void, ): (getEventStore: EventStoreFn) => void { return (getEventStore: EventStoreFn) => desc(name, () => runner(getEventStore)); } type EventStoreFn = (options?: { hooks?: EventStoreHooks; }) => Promise<{ store: EventStore; projector: Projector; }>;