I have found some old blog posts teaching how to mock, but at the time the driver was at v1, and v2 is no longer compatible with the mtest package, implemented on v1, now I can’t find a way to mock the database, anyone know what to do?
Skip to main content
Hi @Fabio_Nacarelli, we usually advise against mocking databases. Instead, it’s better to use a container-based integration testing framework like testcontainers. However, if you need to use a mock deployment, version 2 provides a MockDeployment option in the experimental API. Note that experimental API may be modified or removed without notice.
New & Unread Topics
Topic | Replies | Views | Activity |
---|---|---|---|
MongoDB.local Mumbai - 2024 Confirmation | 3 | 156 | Sep 2024 |
Full text search mongdb 8 community edition | 3 | 303 | Oct 2024 |
Requests being sent to compass.mongodb.com | 2 | 83 | Dec 2024 |
Compass. Schema. Data visualization | 3 | 72 | Dec 2024 |
Trying to find “MongoDB For Beginners” documentation | 1 | 32 | Dec 2024 |