Skip to content

Instantly share code, notes, and snippets.

@robertcasanova
Created August 27, 2013 13:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save robertcasanova/6353887 to your computer and use it in GitHub Desktop.
Save robertcasanova/6353887 to your computer and use it in GitHub Desktop.
Testing with GRUNT + JASMINE
module.exports = function(grunt) {
'use strict';
// Project configuration.
grunt.initConfig({
jasmine : {
src : 'src/**/*.js',
options : {
specs : 'spec/**/*.js'
}
},
jshint: {
all: [
'Gruntfile.js',
'src/**/*.js',
'spec/**/*.js'
],
options: {
jshintrc: '.jshintrc'
}
},
watch: {
jasmine : {
files: ['src/**/*.js', 'specs/**/*.js'],
tasks: 'jasmine'
}
}
});
grunt.loadNpmTasks('grunt-contrib-jasmine');
grunt.loadNpmTasks('grunt-contrib-jshint');
grunt.loadNpmTasks('grunt-contrib-watch');
grunt.loadNpmTasks('grunt-notify');
grunt.registerTask('test', ['jshint', 'jasmine']);
grunt.registerTask('default', ['test']);
};
{
"name": "Grunt And Jasmine Testing",
"description": "",
"version": "0.1.0",
"homepage": "",
"author": {
"name": "Robert Casanova",
"email": "robb.casanova@gmail.com"
},
"scripts": {
"test": "grunt test"
},
"devDependencies": {
"grunt-contrib-jasmine": "~0.4.0",
"grunt": "~0.4.0",
"grunt-contrib-jshint": "~0.2.0",
"grunt-contrib-watch": "~0.5.3",
"grunt-notify": "~0.2.13"
},
"dependencies": {}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment