function createInMemory
createInMemory():
DBConnector
& { listen(channel: string): Task<Channel<Notification, ListenFailed>, ListenFailed>; notify(
channel: string,
payload: string
): Task<void, ListenFailed>; }

Creates an in-memory SQLite connector for testing.

All connections share a single SQLite instance — schema and data created through one connection are visible to others. Suitable for tests that need consistent state across multiple connect() calls.

Return Type

DBConnector
& { listen(channel: string): Task<Channel<Notification, ListenFailed>, ListenFailed>; notify(
channel: string,
payload: string
): Task<void, ListenFailed>; }

Usage

import { createInMemory } from ".";