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
Post a Comment