Skip to content

Instantly share code, notes, and snippets.

@caspian311
Last active November 20, 2015 12:57
Show Gist options
  • Save caspian311/b94226b98c894cfe1c60 to your computer and use it in GitHub Desktop.
Save caspian311/b94226b98c894cfe1c60 to your computer and use it in GitHub Desktop.
How to setup a front-end test environment with Karma
# create project space
mkdir -p <path-to-project>
cd <path-to-project>
# initialize your environment
git init
npm init
bower init
# install app dependencies
bower install angular angular-routes --save
# install test dependencies
bower install angular-mocks --save-dev
npm install karma --save-dev
npm install -g karma-cli
# configure the test runner
karma init # this will prompt for a number of things
# run tests
karma karma.conf.js start
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment