Need Help With Unit Testing

So someone published https://github.com/taylorhakes/painless for unit testing JS and I want to use it with Webstorm.  Do I need to turn on any specific settings in Webstorm? I'm confused about whether I can use it with Webstorm.  There are no plugins in Webstorm for this like there are for Mocha so I wonder if it will work.  The author did publish an npm module for using it with Karma.  I wonder if the Karma plugin in Webstorm would need to be turned on. 

 

Any type of information about unit testing in Webstorm as far as what setup you used is helpful also. Thank you it is much appreciated!

5 comments

From https://github.com/taylorhakes/karma-painless it seems that this library can be used with karma as one of frameworks, so it must be possible to run it in WebStorm using Karma launch configuration. But this can only be used for browser testing. If you like to use this library for testing server-side code, you have to run your tests using Node.js run configuration

0

Thanks for the reply.  Now what exactly does the Webstorm Karma plugin do? What role does it play as opposed to the Karma npm modules?  I'm trying to understand how it works behind the scenes.

0

WebStorm karma plugin provides UI for running Karma tests from the IDE (special run configuration, displaying test results in a special tab in a tree form, debugging tests, running with coverage and highlighting coverage results in the editor, etc.). Note that WebStorm doesn't manage test running directly. This job is done by a test runner (Karma). 

0

Thank you.  Do you know any of other Webstorm forums out there on the web?

0

Please sign in to leave a comment.