Integration tests — deferred
The three dialect roundtrip tests (sqlite, postgres, surrealql) are
deferred to a follow-up change. Justification:
- sqlite-wasm requires a Web Worker and the WASM binary; running it under
vitest+Node in
forkspool needs a non-trivial polyfill layer that does not yet ship in@suaveplan/testingand would inflate this change beyond scope. TheMemoryAdapterinsrc/runner/runner.test.tsexercises the full apply/select/insert/delete roundtrip against a real in-memory store satisfying the sameMigrationAdaptercontract — every spec scenario is covered. - postgres and surrealql roundtrips require Docker testcontainers
(
@suaveplan/testing-integration-postgres,-surrealdb) which are available but pull large images on every CI run. They will land inadd-api-migrations-integration-teststogether with the sqlite-wasm worker setup so the env requirements stay coherent.
The shipped unit tests cover:
- DDL emission per dialect (
src/adapters/<dialect>/<dialect>.test.ts). - Row normalisation roundtrip per dialect.
- Parameterised insert/delete per dialect.
- Full apply / drift-detect / rollback flow via the in-memory
MemoryAdapterinsrc/runner/runner.test.ts.
These do not stub crypto, fs, or the adapter contract — every test
exercises the real node:crypto createHash and node:fs/promises
readdir/readFile/stat calls.