Skip to content

Commit

Permalink
Add Jasmine task with Grunt
Browse files Browse the repository at this point in the history
  • Loading branch information
drublic committed Apr 21, 2013
1 parent aaa1487 commit c99324c
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 4 deletions.
19 changes: 16 additions & 3 deletions Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,14 @@ module.exports = function (grunt) {
}
},

jasmine: {
src: 'modal.js',
options: {
outfile: 'tests/_SpecRunner.html',
template: 'tests/index.html'
}
},

// Watch that stuff
watch: {
scss: {
Expand All @@ -74,6 +82,11 @@ module.exports = function (grunt) {
'tests/spec/modal.js'
],
tasks: 'jshint'
},

test: {
files: ['modal.js'],
tasks: 'jasmine'
}
},

Expand All @@ -97,13 +110,13 @@ module.exports = function (grunt) {
grunt.loadNpmTasks('grunt-contrib-jasmine');

// Default task
grunt.registerTask('default', ['sass', 'jshint']);
grunt.registerTask('default', ['sass', 'jshint', 'jasmine']);

// Building a new version
grunt.registerTask('dist', ['sass:dist', 'copy:dist']);
grunt.registerTask('dist', ['sass:dist', 'copy:dist', 'jasmine']);

// Travis CI task
grunt.registerTask('travis', ['jshint']);
grunt.registerTask('travis', ['jshint', 'jasmine']);


};
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
"grunt-contrib-sass": "0.2.2",
"grunt-contrib-copy": "0.4.0",
"grunt-contrib-connect": "0.1.2",
"grunt-contrib-jasmine": "0.3.3"
"grunt-contrib-jasmine": "0.4.2"
},
"keywords": [
"css",
Expand Down

0 comments on commit c99324c

Please sign in to comment.