I have been pretty busy last few weeks have churning out test cases with Angular JS. And we use Jasmine for unit testing and Karma JS for automating unit tests. For the sake of setting up each developer’s machine with all these tools, I created a simple list of instructions and floated it around. And here we go.
- Install Node JS
- Create a project say MyApp
- Navigate to MyApp in the Terminal or Cmd
- Run npm install angular
- Run npm install angular-mocks
- Run npm -g install karma
- Run npm -g install karma-cli
- Run npm -g install karma-jasmine
- Run npm -g install karma-chrome-launcher
- Run karma init
- Modify the karma.conf.js to include the angular js src files and the jasmine specs
- Run karma start karma.conf.js