Grunt Jasmine configuration

433 Views Asked by At

In the following Grunt configuration for Jasmine, what is the pivotal property for?

// Example configuration
grunt.initConfig({
  jasmine: {
    pivotal: {
      src: 'src/**/*.js',
      options: {
        specs: 'spec/*Spec.js',
        helpers: 'spec/*Helper.js'
      }
    }
  }
});

Is it for "namespacing" your tests?

1

There are 1 best solutions below

0
On BEST ANSWER

pivotal is a target. Right now you have a task jasmine with a single target pivotal.

If you had multiple targets you could selectively run just the one task with grunt jasmine:pivotal.

If you have multiple targets and use grunt jasmine it will run the jasmine task for all of the defined targets.

This is further documented at: http://gruntjs.com/configuring-tasks#task-configuration-and-targets