In previous post i’ve built flickr search app with angularjs you can read here. In this tutorial i will show you how to test application with Karma, Jasmine, Phantomjs.
I will use npm to download necessary libraries. You can find npm terms below.
npm install phantomjs-prebuilt --save-dev
npm install karma-phantomjs-launcher --save-dev
npm install karma-jasmine --save-dev
After download Karma, i need to initialize karma with “karma init” to create karma.conf.js.
I will create test->unit->flickrAngularAppUnitSpec.js file to write test with following code.