README documents supported key patterns, unique/sparse/multikey behavior, planner rules (multikey two-bound range fallback, sparse/null bail, the _id fast-path guards), and v1 limits plus the two pre-existing issues the work surfaces (drop-collection resurrection, compact log_bytes). e2e3.js exercises createIndex/getIndexes/dropIndex/dropIndexes, the unique-constraint 11000 path, compound, sparse, and descending indexes through the official Node driver.
End-to-end tests with the official MongoDB Node.js driver
These exercise mongo-light from a real driver over TCP: full CRUD, query operators, aggregation, error codes, concurrent clients, and crash recovery.
Setup
cd tests/e2e
npm init -y >/dev/null
npm install mongodb
Run
Start the server, then run the suites against it (defaults to port 27020):
zig build
zig-out/bin/mongo-light --port 27020 --db /tmp/ml-e2e.log &
node tests/e2e/e2e.js # CRUD + operators + aggregate + errors (29 checks)
node tests/e2e/e2e2.js concurrent # 8 clients: 4 writers + 4 readers (2 checks)
node tests/e2e/e2e2.js crash-a # write 50 docs, then kill -9 the server
node tests/e2e/e2e2.js crash-b # restart and verify all 50 survived
e2e2.js concurrent is safe to repeat against a running server (it drops its
collection first); crash-a/crash-b are two halves of one scenario.