/grunt-jasmine-boilerplate

Grunt process for running test with Jasmine and controlling code coverage.

Primary LanguageJavaScriptMIT LicenseMIT

grunt-jasmine-boilerplate

Build Status Coverage Status

Project with a grunt process with:

  • JSHint
  • Jasmine unit tests in a headless browser from the command line and/or in a real browser
  • Coveralls code coverage reports

Start by installing the required node modules: npm install

You can then run the following tasks:

  • grunt jasmine - Run tests and in the console and code coverage statistics.
  • grunt jasmine:coverage - Generate code coverage report and show statistics in the console
  • grunt jshint - Start Jshint validation
  • grunt test - jshint + jasmine:coverage

You could install dependencies manually

npm install grunt --save-dev
npm install grunt-contrib-jshint --save-dev
npm install grunt-contrib-jasmine --save-dev
npm install grunt-template-jasmine-istanbul --save-dev
npm install grunt-coveralls --save-dev

Preparing continuos integration with travis-ci

Add .travis.yml file and include basic configuration.

language: node_js
node_js:
  - "stable"
before_install: npm install -g grunt-cli
install: npm install
before_script: grunt