Initial Commit
This commit is contained in:
@@ -0,0 +1,29 @@
|
||||
# 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 `forks` pool needs a non-trivial polyfill layer that does
|
||||
not yet ship in `@suaveplan/testing` and would inflate this change beyond
|
||||
scope. The `MemoryAdapter` in `src/runner/runner.test.ts` exercises the
|
||||
full apply/select/insert/delete roundtrip against a real in-memory store
|
||||
satisfying the same `MigrationAdapter` contract — 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 in
|
||||
`add-api-migrations-integration-tests` together 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 `MemoryAdapter`
|
||||
in `src/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.
|
||||
Reference in New Issue
Block a user