Kill any currently running MongoDB instances on OSX, Linux, or Windows.
npm install --save-dev kill-mongodb;
If your tests start mongodb, you can just add a handy posttest
hook
to kill off any instances that might be lingering.
{
...
"scripts": {
"test": "mocha",
"posttest": "kill-mongodb"
}
...
}
Apache 2.0