express-mongoose-es6-rest-api
express-mongoose-es6-rest-api copied to clipboard
Added mockgoose
Mockgoose uses an in-memory version of mongodb so tests start fresh each time and no database is polluted should certain tests fail.
Edit: one thing ive noticed with Mockgoose is that if your internet is slow (or not available), the first test that uses mockgoose will fail with timeout exceeded. I think this is because mockgoose is checking if the prebuilt mongodb binary is up to date. Not sure this is acceptable for this project but personally I'm okay with it. See https://github.com/Mockgoose/Mockgoose/issues/20
Coverage decreased (-0.3%) to 89.241% when pulling 62c763fc6c54b387959afb5726bb64ad5fd5b709 on Christilut:develop into 8bc61e2c5dec27014f770059630802aa21d6587c on KunalKapadia:develop.
Coverage decreased (-0.3%) to 89.241% when pulling 6ed47ab7cb5d97112f23fc4017ddfdd2b30fe864 on Christilut:develop into 8bc61e2c5dec27014f770059630802aa21d6587c on KunalKapadia:develop.
This looks wrong. Mockgoose says it spins up a mongod and the example shows how to add this to the chai tests. Why do you implement it in the server?