Local development and testing
Silt lets you run supported MongoDB application code without starting a database service. Use a persistent file during development and an isolated database for each test.
Develop with a local file
Pass db to application code as you would a MongoDB database handle. Keep the client open while the application runs, then await client.close() on shutdown. Reopening the same file retains its documents and indexes.
Keep development database files and their -wal and -shm companions out of source control.
Isolate tests
On Node, :memory: creates a database owned by that client. A new client gives each test a fresh fixture.
Use a unique temporary file instead when testing persistence across reopen. Applications can accept a database or collection in their setup code, letting the same business logic run against Silt or MongoDB.
What these tests establish
Silt tests your application's supported JSON workload. Keep real MongoDB integration checks for code that also targets MongoDB, especially dependencies on BSON, server features, concurrency details, or errors. The compatibility reference lists those boundaries.