I am using latest development master branch of meanjs with WebStorm for IDE. Last version of WebStorm support running/debugging single karma test from IDE. Unfortunately meanjs breaks with a mongoose error "MissingSchemaError: Schema hasn't been registered for model "User"."
This should be something with js order of parsing file/ missing require() call/ or not providing karma.conf.js.
"C:\Program Files\nodejs\node.exe" C:\projects\node\meanjs\node_modules\mocha\bin\_mocha --ui bdd --reporter "C:\Program Files (x86)\JetBrains\WebStorm 11.0\plugins\NodeJS\js\mocha-intellij\lib\mochaIntellijReporter.js" C:/projects/node/meanjs/modules/articles/tests/server/article.server.model.tests.js --grep "Article Model Unit Tests\: Method Save should be able to save without problems$"
You can safely remove --reporter option if you don't have WebStorm. It will fail again :)
"C:\Program Files\nodejs\node.exe" C:\projects\node\meanjs\node_modules\grunt-cli\bin\grunt --gruntfile C:\projects\node\meanjs\gruntfile.js karma:unit
C:\projects\node\meanjs\node_modules\mongoose\lib\index.js:333
throw new mongoose.Error.MissingSchemaError(name);
^
MissingSchemaError: Schema hasn't been registered for model "User".
Use mongoose.model(name, schema)
at Mongoose.model (C:\projects\node\meanjs\node_modules\mongoose\lib\index.js:333:13)
at Object.<anonymous> (C:\projects\node\meanjs\modules\articles\tests\server\article.server.model.tests.js:8:19)
at Module._compile (module.js:460:26)
at Object.Module._extensions..js (module.js:478:10)
at Module.load (module.js:355:32)
at Function.Module._load (module.js:310:12)
at Module.require (module.js:365:17)
at require (module.js:384:17)
at C:\projects\node\meanjs\node_modules\mocha\lib\mocha.js:172:27
at Array.forEach (native)
at Mocha.loadFiles (C:\projects\node\meanjs\node_modules\mocha\lib\mocha.js:169:14)
at Mocha.run (C:\projects\node\meanjs\node_modules\mocha\lib\mocha.js:356:31)
at Object.<anonymous> (C:\projects\node\meanjs\node_modules\mocha\bin\_mocha:366:16)
at Module._compile (module.js:460:26)
at Object.Module._extensions..js (module.js:478:10)
at Module.load (module.js:355:32)
at Function.Module._load (module.js:310:12)
at Function.Module.runMain (module.js:501:10)
at startup (node.js:129:16)
at node.js:814:3