node.js - How to test nodejs backend code with Karma (testacular) -


how setup karma run backend unit tests (written mocha)? if add backend test script files = [], fails stating require undefined.

you don't. karma testing browser-based code. if have project mocha tests on backend , karma/mocha on front end, try editing package.json under scripts set test to: mocha -r spec && karma run karma.con

then, if npm test returns true, you'll know it's safe commit or deploy.


Comments

Popular posts from this blog

python - How to create a legend for 3D bar in matplotlib? -

java - Multi-Label Document Classification -

php - Dynamic url re-writing using htaccess -