Skip to content

runStateAdapterConformance

runStateAdapterConformance(factory, options?): Promise<ConformanceReport>

Defined in: packages/core/src/conformance/state-adapter.ts:31

Run the state adapter conformance suite against a user-supplied adapter. Test-framework agnostic: designed to be embedded in a single test (vitest test(), bun test(), node:test, etc.). Throws ConformanceError with an aggregated report on any failure.

() => Promise<StateConformanceFixture>

StateConformanceOptions

Promise<ConformanceReport>

await runStateAdapterConformance(async () => {
const adapter = await createMyStateAdapter();
await adapter.migrateToLatest();
return {
stateAdapter: adapter,
reset: async () => adapter.truncate(),
dispose: async () => adapter.close(),
};
});