Melon-dbMelon-db
Packages

@melon-db/db-testkit

Test helpers and withTestDatabase fixtures.

Status: Shipped · Depends on: @melon-db/db · API: Reference

Deterministic in-memory testing without native SQLite.

Install (alpha)

npm install @melon-db/db-testkit@alpha

Or with Bun:

bun add @melon-db/db-testkit@alpha
import { withTestDatabase } from '@melon-db/db-testkit';

await withTestDatabase(schema, async (db) => {
  await db.write(async (tx) => {
    await tx.collection('tasks').insert({ id: '1', title: 'Test' });
  });
});

Re-exports in-memory adapter helpers aligned with @melon-db/db test patterns.

Author & license

Copyright (c) 2026 Nate Nichols. MIT License.