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

user interface - Python attempting to create a simple gui, getting "AttributeError: 'MainMenu' object has no attribute 'intro_screen'" -

jquery - Common JavaScript snippet to share files on Google Drive, Dropbox, Box.net or SkyDrive -

Android Gson.fromJson error -