John Lindquist: ...karna only takes one minute to set up after you've installed node into NPM and npm install -g karma, because all you have to do is switch over to WebStorm or use the terminal. I'm going to use the one in WebStorm.
Say, karma init
Once that's installed, I'm going to use Jasmine for my testing, no require JS. I use Chrome. I'll define test file paths later and I don't want to exclude anything. I'm not going to have Karma watch for file changes because I'll have WebStorm do that for me.
Then the file is generated. You can see when I double clicked on the folder that Karma is in there, and it's ready to run. I can actually simply right click on it now in WebStorm and say, "Run Karma." It will run and nothing. It didn't run anything.
This will generate this file. I'll say, "Describe." I'll describe hello. We want it...
It should work. From there, we say, "Expect true to be false" because we want it to fail once. We want control-R to rerun, and expected true to be false. Then all of this simply changed to true. Then rerun and we have our first passing test.
You can see up here that that's actually that actual file. We have our first test running and Karma was installed. Basically, I'm just going to be adding files to this list of files to keep on testing them.
If you want to use the command line to run Karma tests, just go to the configuration. It will show you the steps. It will say, "Starting Karma. Karma start," and some of the arguments you can pass in for the customizations you want to do.