If you're using AngularJS, check out the AngularJS Generator, which makes use of the Karma Generator to setup a fully featured, testing-ready project.
Here is also a blog article explaining how to setup Grunt and Karma to test out an AngularJS application: Full Spectrum Testing with AngularJS and Karma