Skip to content

runStorageConformance

function runStorageConformance(
name,
make,
options
): void;

Defined in: src/storage/testing/conformance.ts:693

Register the full conformance suite for one driver: the base contract, plus the compare-and-swap and watch cases when capabilities says the driver has them.

Parameter Type
name string
make MakeStorage
options ConformanceOptions

void

import { describe, expect, test } from "vitest"; // or "bun:test"
import { runStorageConformance } from "@xtandard/kit/storage/testing";
import { createMemoryStorage } from "@xtandard/kit/storage/memory";
runStorageConformance("memory", () => createMemoryStorage(), {
t: { describe, test, expect },
capabilities: { compareAndSwap: true, watch: true },
keyRoot: "whk",
});