Skip to content
loading...

re: NodeJS - Unit Tests - testing without hitting database. Confusings. VIEW POST

FULL DISCUSSION
 

from my own experience, it is easier to setup a separate database for testing and you run several scripts to prepare database before running.

If you are in deep need to run without database and you are using mongodb and moongoose, I know a library called mockgoose which is pretty good to mock db

code of conduct - report abuse