A plugin for #gruntjs to run #jasmine specs: grunt-jasmine-task

grunt-jasmine-task


This plugin is deprecated and replaced by grunt-contrib-jasmine


I wrote a plugin to run jasmine specs with grunt.
It should be stable and is available through npm.

Installation

Install this grunt plugin next to your project’s grunt.js gruntfile with:

npm install grunt-jasmine-task

Note: it’s best to install it as a local node module, not global.

Then add this to your project’s grunt.js gruntfile, inside the grunt.initConfig object:

    jasmine: {
      index: ['specs/index.html']
    },

replace specs/index.html obviously with the location of your jasmine spec running html file.

and at the bottom of your grunt.js gruntfile add:

grunt.loadNpmTasks('grunt-jasmine-task'); 

now you can run the jasmine task with:

grunt jasmine

Source

Source can be found in the grunt-jasmine-task github project

Feedback

Issues can be posted in the issue queue, all other feedback is welcome here in the comments, or on twitter: @camillereynders

Advertisements
  1. In other places I saw you need to have installed PhantomJS to make jasmine task in grunt, that’s needed? or can I use jasmine without PhantomKs

  1. April 20th, 2012

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: