Karma is a JavaScript test runner that works by launching different browsers and running tests against each of them. It records the status of each test so you know which tests failed in certain browsers, making cross-browser compatibility testing incredibly easy. Note that you will need to use Karma with Windows to test in Internet Explorer.
STEP 1: INSTALLATION
Install Karma and the necessary plugins using NPM.
You also need to install a few required plugins before you can start using Karma. First download the correct plugin for your chosen testing framework (Jasmine, Mocha, etc.).
Also install the launcher plugins for the browsers you want to execute your tests against. There are launcher plugins for all major browsers.
*Note: The --save-dev option saves the package as a dev dependency to the package.json file