Files
turso/serverless/javascript/differential/package.json
Glauber Costa c3653536f5 serverless: add differential test suite for serverless drivers
Add property-based differential tests that compare an embedded Turso
driver against the serverless driver of the same language, running
against a live Turso Cloud database configured with TURSO_DATABASE_URL
and TURSO_AUTH_TOKEN. The tests skip when the variables are unset.

Random operation sequences (DDL, DML, queries, parameter binding,
transactions, batches, triggers, error cases) execute on both drivers,
and every result must match: success or failure, column names and
counts, row counts, value type tags, cell values, affected row counts,
and last insert rowids. Because the workloads are generated, the suite
finds divergences no hand-written test covers, and fast-check shrinks
failures to a minimal reproducing sequence.

The shared operation vocabulary lives in
serverless/conformance/differential/spec/ops.json so every language
harness faces the same workloads; each harness lives next to the driver
it tests. The JavaScript harness in serverless/javascript/differential
covers @tursodatabase/serverless against the native
@tursodatabase/database driver; since the serverless driver mirrors the
embedded API, one adapter drives both sides and any API divergence
fails the suite.

Co-authored-by: Pekka Enberg <penberg@iki.fi>
2026-07-22 17:30:34 +03:00

18 lines
396 B
JSON

{
"name": "@tursodatabase/serverless-differential",
"version": "0.0.0",
"private": true,
"type": "module",
"scripts": {
"test": "ava --timeout=15m"
},
"devDependencies": {
"ava": "^6.4.1",
"fast-check": "^4.6.0"
},
"dependencies": {
"@tursodatabase/database": "file:../../../bindings/javascript/packages/native",
"@tursodatabase/serverless": "file:.."
}
}