Testing the Data Layer with mongodb-memory-server
mongodb-memory-server starts a real, throwaway MongoDB for a test file, the way the helper in every exercise of this course does, so before starts it, beforeEach puts the same documents back for every test, node --test and assert check the data layer, Supertest checks a route, and after stops it, never touching your own data.
Updated

- Category
- MongoDB
- Level
- Journeyman
- Tags
- Integration Test, mongodb, mongodb-memory-server, node:test, nodejs, Supertest, Test Isolation, unit testing