For AI agents: the complete documentation index is available at https://silt-db.dev/llms.txt, the full documentation bundle is available at https://silt-db.dev/llms-full.txt, and this page is available as Markdown at https://silt-db.dev/contributing/testing.md.

Testing and compatibility evidence

MongoDB behavior is the compatibility target. Mingo supplies useful MIT-licensed inputs and a secondary comparison; it is not the specification. Passing tests and line coverage measure different things from implemented operator support.

Everyday checks

npm ci
npm run typecheck
npm test
npm run test:sharedb
npm run test:coverage
npm run format:check
npm run docs:typecheck
npm run docs:build

npm test runs compiler, storage, driver, adapter, captured-reference, and explicit rejection tests. test:sharedb runs the unmodified official ShareDB database/client harness. test:coverage combines those suites and measures all packages/**/src/**/*.js, including nested drivers. Native C coverage and actual browser execution are separate.

Tests requiring an optional extension or a live MongoDB server skip explicitly when it is absent. A skip does not certify that environment.

Choose the relevant suite

ChangeUseful checks
Query/path/JSON comparison semanticstest/query.test.js, test/common.test.js, test/differential.test.js, test/ordering-oracle.test.js
Aggregations, lookup, expressionstest/pipeline.test.js, test/expression.test.js, test/upstream-expressions.test.js, live MongoDB pipeline tests
Index planning or stored keystest/indexing.test.js, test/storage-format.test.js, test/numeric-precision.test.js
Collection writestest/update.test.js, test/storage.test.js, live MongoDB update tests
Driver ownership, transactions, portabilitytest/drivers.test.js, test/driver-review.test.js, test/expo-portability.test.js
ShareDBtest/sharedb.test.js, test/sharedb-drivers.test.js, npm run test:sharedb
User-facing examples and docsnode examples/docs-quick-start.mjs, npm run docs:build

For example, node --test test/indexing.test.js test/storage-format.test.js runs only those suites.

Live MongoDB comparisons

Use a disposable MongoDB server that you control:

MONGODB_URI=mongodb://127.0.0.1:27017 npm run test:mongo

Or provide an existing mongod executable:

MONGODB_BINARY=/absolute/path/to/mongod node scripts/with-mongo.mjs

The runner downloads no binary. It binds to localhost, uses temporary data, and shuts down normally. The suites create uniquely named databases and drop those test databases during cleanup. A supplied but unreachable URI is a failure, not a skip.

Set MONGODB_REQUIRE_VERSION to the release line you intend to certify. For example:

MONGODB_REQUIRE_VERSION=8.3 MONGODB_BINARY=/absolute/path/to/mongod \
  node scripts/with-mongo.mjs

Do not equate a passing captured MongoDB 8.0 reference with a live run on another version.

Optional native regex

On Ubuntu, install a C compiler and PCRE2 development headers, then build the extension:

sudo apt-get install build-essential libpcre2-dev
npm run build:native
node --test test/native-regex.test.js test/portable-regex.test.js

Portable regex must continue to work without this extension. See the regex reference.

Python SQLite cross-check

The numeric suite replays 98 generated SQL probes and a deterministic set of canonical-key probes through Python SQLite. Exact numeric text comparison requires SQLite 3.53+; older builds have different conversion behavior. CI compiles a test-only SQLite library from the locked better-sqlite3 amalgamation and sets SILT_REQUIRE_PYTHON_SQLITE=1, so this check cannot silently skip.

On Linux, reproduce that environment with:

bash scripts/ci-python-sqlite.sh /tmp/silt-python-sqlite
SILT_PYTHON_SQLITE_LIBRARY=/tmp/silt-python-sqlite \
  SILT_REQUIRE_PYTHON_SQLITE=1 node --test test/numeric-precision.test.js

This is test infrastructure; applications need no custom SQLite build. The numeric precision page describes the separate limitations observed in Expo SQLite.

Teamplay and Expo

npm run test:teamplay -- --setup
npm --prefix integration/expo ci
npm run test:expo
npm run test:expo:bundle

Teamplay setup installs an isolated, pinned upstream checkout. Its matrix exercises the same application over local and WebSocket ShareDB connections. Expo dependencies are isolated under integration/expo; the browser runner executes the actual SQLite WASM runtime and the Teamplay app. See Teamplay and Expo for prerequisites and ownership rules.

The web/iOS/Android export check generates bundles and Hermes bytecode. It does not execute an iOS or Android application on a device or emulator.

Recorded evidence

The implementation verification on 2026-09-05 recorded the following. These suites overlap and must not be added together as a count of distinct supported operations.

EnvironmentRecorded result
Local Node suite with optional native extension1,553 passed, 0 failed, 7 live-server groups skipped
Official ShareDB harness339 passed
Live MongoDB 8.0.29 Community1,068 passed, no skips
Teamplay Node matrix12 matrix tests, 24 fresh-process phases
Actual Expo browser132 checks passed, no browser console errors
iOS/Android runtimeNot executed

Hosted CI subsequently passed on commit 550ab8e, including the required Python cross-check and separate native/non-native jobs. Current results are available in GitHub Actions.

MongoDB 8.3.8 could not initialize in the original execution environment and is not certified by those results. Full Mingo feature/coverage parity has also not been reached. Review the compatibility matrix before interpreting totals.

Historical verification logs retain the original environment and measurements. They are evidence from that run, not continuously updated release claims.

Fixture provenance and regeneration

test/fixtures/ holds original cases and MongoDB-captured expected values, including inputs derived from Mingo 7.2.4 under MIT. Imported cases retain source identifiers and MINGO-LICENSE. MongoDB server-source tests were not copied wholesale.

# Requires a trusted local Mingo source checkout and its TypeScript dependency.
node scripts/import-mingo-fixtures.mjs /absolute/path/to/mingo
node scripts/audit-mingo-fixtures.mjs
node scripts/audit-mingo-fixtures.mjs --mongo --strict

MONGODB_BINARY=/absolute/path/to/mongod \
  node scripts/with-mongo.mjs scripts/capture-mongo-reference.mjs

Inventories and audit summaries live under internal/audits/. The importer executes trusted upstream fixture modules; its VM timeout is not a security boundary. Review changed expected values and support classifications. Passing an explicit unsupported-operation rejection test does not mean the operation is implemented, and matching an error does not promise MongoDB's exact error code or wording.