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

blackberry 10 - how to add multiple markers on the google map just by url? -

php - guestbook returning database data to flash -

delphi - Dynamic file type icon -