conformance/Fixture
What a storage adapter gives the conformance suites: fresh storage for each test, and stores
over it as separate hosts would open them. An adapter implements it in its tests and passes it
to run.
Since v0.2.0
Testing
Section titled “Testing”ConnectOptions (interface)
Section titled “ConnectOptions (interface)”How Storage.connect opens a store.
Signature
export interface ConnectOptions { /** * Report a writer another connection holds as contention promptly, where the adapter would * otherwise wait for it. For tests of contention; stores wait by default. */ readonly failFast?: boolean | undefined}Since v0.2.0
Fixture (interface)
Section titled “Fixture (interface)”What an adapter’s tests give run: how to open fresh storage, and whether it is there to test.
Signature
export interface Fixture { /** Names the adapter in suite titles. */ readonly name: string /** False skips every suite, for an adapter whose backing system is absent here. */ readonly available: boolean /** Run one test over fresh, empty storage. */ readonly withStorage: <A, E>(use: (storage: Storage) => Effect.Effect<A, E, Scope.Scope>) => Effect.Effect<A, E>}Since v0.2.0
Storage (interface)
Section titled “Storage (interface)”One test’s storage: empty when the test begins, released when it ends.
Signature
export interface Storage { /** * Open a store over this storage as a separate process would, with its own connection or pool, * closed with the scope. Stores opened here share committed state and contend for its writers. */ readonly connect: (options?: ConnectOptions) => Effect.Effect<Store.Store["Service"], never, Scope.Scope>}Since v0.2.0