JavScript unit tests are run in a browser against a test server which actually handles the testing process.
This server allows you to capture a browser to run tests in, loads the test targets to the captured browser, controls the testing process, and exchanges data between the browser and PhpStorm, so you can view test results without leaving the IDE.
The test server does not necessarily have to be on your machine, it can be launched right from PhpStorm through a test runner. Currently, PhpStorm supports integration with two test runners: JSTestDriver and Karma.
In this part:
- Running Unit Test on JSTestDriver
- Running Unit Tests on Karma
- Running Mocha Unit Tests
- Running Nodeunit Tests