1.0.0 • Published 10 years ago
mocha-mongoose-fix-overwitemodelerror v1.0.0
mocha-mongoose-fix-overwitemodelerror
Fixes Mongoose issue #1251 with mocha in watch mode
Works best with mocha --require=env-test.
Why?
When you use Mongoose and run your tests with mocha --watch, on each reload you may encounter a fatal OverwriteModelError error.
How?
- Install with
npm install --save-dev mocha-mongoose-fix-overwitemodelerror - Edit
test/mocha.optsand add the line--require=mocha-mongoose-fix-overwitemodelerror
This will ensure mocha models are properly (or brutally) reset before relaunching tests.
1.0.0
10 years ago