Connector conformance test suite.
Provides reusable test suites that backend connector packages run to verify their Store implementations satisfy the contracts defined by @metreeca/keep.
@metreeca/keep
testStore covers resource retrieval, CRUD operations, unconditional insert/remove, transaction execution, change notifications, and lifecycle management.
Connectors call testStore with a StoreTestOptions object that provisions store instances and loads them with the sample dataset.
import { testStore } from "@metreeca/keep-suite";import { describe } from "vitest";describe("my-connector", () => testStore({ open: () => createMyStore(), contains: (id) => myStoreExists(id), includes: (resource, shape) => myStoreIncludes(resource, shape), excludes: (resource, shape) => myStoreExcludes(resource, shape), populate: () => myStorePopulate(), generate: (resource, shape) => myStoreGenerate(resource, shape)})); Copy
import { testStore } from "@metreeca/keep-suite";import { describe } from "vitest";describe("my-connector", () => testStore({ open: () => createMyStore(), contains: (id) => myStoreExists(id), includes: (resource, shape) => myStoreIncludes(resource, shape), excludes: (resource, shape) => myStoreExcludes(resource, shape), populate: () => myStorePopulate(), generate: (resource, shape) => myStoreGenerate(resource, shape)}));
Options for running a store conformance suite.
A recursively optional view of a resource state.
Sub-suite or test selector pattern accepted by target and ignore.
Sub-suite and test selection for a conformance run.
Runs the store conformance suite.
Connector conformance test suite.
Provides reusable test suites that backend connector packages run to verify their Store implementations satisfy the contracts defined by
@metreeca/keep.testStore covers resource retrieval, CRUD operations, unconditional insert/remove, transaction execution, change notifications, and lifecycle management.
Connectors call testStore with a StoreTestOptions object that provisions store instances and loads them with the sample dataset.