Testing with a Real Database
Testing with a Real Database: Testing with mongodb-memory-server.
Updated
- Testing with mongodb-memory-server (Journeyman): mongodb-memory-server starts a real, throwaway MongoDB for a test file, so before starts it, beforeEach gives every test the same fresh data, Supertest tests the whole API against it, and after stops it, with your own data never touched.